Dmitry Jemerov

This quote was added by kalmyk
Do you remember how children memorize the colors of the rainbow? "Richard Of York Gave Battle In Vain!" Imagine you need a function that gives you a mnemonic for each color (and you don't want to store this information in the enum itself). In Java you can use a switch statement for this. The corresponding Kotlin construct will be when. Like if, when is an expression that returns a value, so you can write a function with an expression body, returning the when expression directly.

Train on this quote


Rate this quote:
2.5 out of 5 based on 6 ratings.

Edit Text

Edit author and title

(Changes are manually reviewed)

or just leave a comment:


Test your skills, take the Typing Test.

Score (WPM) distribution for this quote. More.

Best scores for this typing test

Name WPM Accuracy
taehyungkwon 100.52 95.1%
giannepaula07 93.90 95.3%
klgrass84 92.99 95.8%
ipanja 91.04 88.3%
freakbuoyancy 77.65 95.7%
richardma 76.34 94.2%
psbank 76.01 95.5%
venus12gates 75.68 96.1%
madreev 71.63 95.5%
user97848 71.58 93.2%

Recently for

Name WPM Accuracy
morkel 45.25 89.6%
user97848 71.58 93.2%
user85658 64.06 94.3%
js88 46.62 94.7%
saleen998 56.02 95.8%
cross3stitch9 55.92 91.0%
user898756 28.79 86.7%
2012a 24.44 85.5%