Having an issue passing this exercise


Hi everyone!
I am also having an issues passing this exercise. The error states "Oop, try again. It look like you printed out the wrong number of items,"
Here is my code:
var numbers = function(){
for (var i=0; i<20; i++) {
if(i % 3 === 0 && i % 5 === 0) {
}else if(i % 3 === 0) {
}else if(i % 5 === 0) {
please help. I have tried every trick I know.

Thanks In Advance

3. And the Good: What am I doing wrong?

Two things. The SCT does not know that you have written a function so won't know how to call it. Write raw code without a function wrapper. Second thing is the interval over which the loop interates. 0..19 rather than 1..20. Fix these two things and your code is good.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.