Can someone spot the errors in my code? :)


#1

I have been blocked on my code for a couple of hours now. I don't understand what I am doing wrong, although I can tell something is not right in my code :/.
My code is the following:
var number = function(i) {
for (var no=1; no<=20;no+1){
if(no%3===0){
console.log("Fizz")}
else if(no%5===0){
console.log("Buzz)}
else if (no%3===0&&no%5===0) {console.log("Fizzbuzz")}
else{
console.log("no")
}}

I think there might be something wrong for the "for", but I think the if,else if, and else are right.


#2

http://jsbeautifier.org/


#3

Please go HERE. It seems like you really need it...


#4

Make "(no%3===0&&no%5===0)" the first condition to be evaluated. 15 is being evaluated with this condition "(no%3===0)", hence "Fizz" is logged to the console.