Skip to content

Commit ab566c6

Browse files
committed
Code cleanup
1 parent b1f6b02 commit ab566c6

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎kotlin-js/src/main/kotlin/com/baeldung/kotlinjs/CryptoRate.kt‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ fun main(args: Array<String>) {
1010
val app = express()
1111

1212
app.get("/crypto", { _, res ->
13-
println(generateCryptoRates())
14-
res.send(generateCryptoRates())
13+
res.send(generateCryptoRates())
1514
})
1615

1716
app.listen(3000, {
1817
println("Listening on port 3000")
1918
})
2019
}
2120
fun generateCryptoRates(): Array<CryptoCurrency>{
22-
val crytoCurrency = arrayOf<CryptoCurrency>(CryptoCurrency("Bitcoin",
23-
90000F), CryptoCurrency("ETH",1000F),
24-
CryptoCurrency("TRX",10F));
25-
return crytoCurrency
21+
val cryptoCurrency = arrayOf<CryptoCurrency>(
22+
CryptoCurrency("Bitcoin", 90000F),
23+
CryptoCurrency("ETH",1000F),
24+
CryptoCurrency("TRX",10F)
25+
);
26+
return cryptoCurrency
2627
}

0 commit comments

Comments
 (0)