Can't get Numbers, Buzz, Fizz and FizzBuzz to Print


#1



https://www.codecademy.com/courses/spencer-sandbox/0/3?curriculum_id=506324b3a7dffd00020bf661


All I get is "Buzz"

Firstly - Why do the "" keep showing up on all my String logs?

Secondly - Why can't I get the numbers to print as well as the Strings Buzz/Fizz

Thirdly - Is it me or is the Javascript tasks very unhelpful and buggy?

I'm tired of the "console.log is not a function" errors and messy string statements being printed with all the [ / "" showing in the console. I have looked at the forums on nearly every task after the Contact List task because it's becoming more cryptic in its feedback. Another thing I do is look back to my older tasks and copy and paste the functions/ arrays in the current console to double check my syntax and it STILL doesn't work even though previous tasks got approved. Something is up with the console.

Also I like doing the tasks, step by step. I would do part 1 of task and "Submit Code" just to check I'm on track but with the way these errors are not printing correctly nor keeping suitable feedback, I end up on the forum and have to copy and paste code. I want to learn but this is getting frustrating.


for (var i = 1; i < 21; i++) {
console.log = i;
  if (i % 3 === 0) 
  {
      console.log = "Fizz";
  }
  else if(i % 5 === 0)
  {
     console.log = "Buzz";
  }
  else if(i % 3 === 0 && i % 5 === 0)
  {
      console.log = "FizzBuzz";
  }
  else {
 console.log = i;
  }
};


#2

Firstly - Why do the "" keep showing up on all my String logs?

You should put it like this: console.log("Buzz"); and console.log(i);


#3

It won't be a function any more after you assign a string to it.

That's fine, just ignore what codecademy says and pay attention to what effect your code has, that's what you should be doing anyway.

Doing yourself a disfavour, you'll just have to ask again. What you need to achieve is not the correct code, but the ability to produce it. The finished code can't tell you the full story of how to do that.

This is where you need to make observations about how your code acts differently from what you mean for it to do. The difference therein will usually say a great deal about what adjustment you need to be making.