Type Check in Kotlin

Level 118 keystrokes

Checks whether 42 is of type Int and prints the result.

Kotlin code

// The is operator checks whether a value is of the given type
// 42 is an Int, so this prints true
1println(42 is Int)

Output

true
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Kotlin code and how often they appear.

  • (× 1
  • )× 1

More Kotlin examples at level 1

← Kotlin typing practice