Submit your solution in JavaScript

FizzBuzz
Write a function called fizzBuzz that takes in one integer as an argument.
The function should return the integer that it was given, except when it is a multiple of 3 or 5.

If the number is a multiple of 3, return 'Fizz' instead of the number. 
Similarly, if the number is a multiple of 5, return 'Buzz'.
Lastly, if the number is a multiple of both 3 and 5, return 'FizzBuzz'. 
              
JavaScript Syntax

Quick reference for those that do not use JavaScript often.

Displaying Output
alert('Hello there!');
Testing
assert(1 == 2, 'Assertion failed!');
Conditional
if (num >= 100) {  doStuff(); } else {  doOtherStuff(); }
Loop
for (var i = 0; i < n; i++) {  alert(i); } while (n >= 0) {  alert(n);  n--; }
Function
function multiply(x, y) {   return x * y; } alert(multiply(2, 5));
Editor Shortcuts

Useful shortcuts for the editor.

Auto Indent

Shift + Tab
Auto indent current line or selected block of code.

Auto Complete

Ctrl + Space
Suggests a list of possible words to complete your currently typed word.

Jump to Line

Alt + G
Jump to a line and character position.
Ex: 5:32 jumps to line 5 at character 32.

Search / Replace

Ctrl + F : Start searching
Ctrl + G : Find next
Ctrl + Shift + G : Find previous
Ctrl + Shift + F : Replace
Ctrl + Shift + R : Replace all

Tips

Useful tips to make your experience better.

Highlight

Noticed highlights that are shown when you run your code?
Those highlights indicate the section of your code that are being interpreted by the JavaScript interpreter.

Play close attention to better see the flow of your code, and maybe pick up a thing or two about how interpreter works!