Practice
Type the solution in the editor and hit Run. Reveal the official solution when you're stuck.
Print numbers 1 to 10
EasyUse a for loop to log 1, 2, 3 … 10 to the console.
Try it yourself
Console
Click Run to see output.
Even or Odd
EasyWrite a function isEven(n) that returns 'even' or 'odd'.
Try it yourself
Console
Click Run to see output.
Largest of 3 numbers
EasyReturn the biggest of three numbers without using Math.max.
Try it yourself
Console
Click Run to see output.
Reverse a string
EasyReverse 'javascript' → 'tpircsavaj'.
Try it yourself
Console
Click Run to see output.
Count vowels
MediumCount how many vowels (a,e,i,o,u) appear in a sentence (case-insensitive).
Try it yourself
Console
Click Run to see output.
Find duplicates in array
MediumReturn a unique list of values that appear more than once.
Try it yourself
Console
Click Run to see output.
Mini calculator function
MediumWrite calc(a, op, b) supporting +, -, *, /.
Try it yourself
Console
Click Run to see output.
Validate email
MediumReturn true if the string looks like an email (simple check).
Try it yourself
Console
Click Run to see output.
FizzBuzz (1 to 30)
HardPrint Fizz for multiples of 3, Buzz for 5, FizzBuzz for both, else the number.
Try it yourself
Console
Click Run to see output.
Palindrome check
HardIgnore case and non-letters. 'A man, a plan, a canal: Panama' → true.
Try it yourself
Console
Click Run to see output.
Debounce a function
HardWrap fn so it only runs after the user stops calling it for `wait` ms.
Try it yourself
Console
Click Run to see output.