Check Integer in JavaScript
Level 133 keystrokes
Number.isInteger() checks whether 5 is an integer and prints true.
JavaScript code
// Number.isInteger() returns true only for numbers with no fractional part// 5 is an integer, so true; 5.5 or the string "5" would give false1console.log(Number.isInteger(5));Output
true
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this JavaScript code and how often they appear.
.× 2(× 2)× 2;× 1