Please help am stuck cannot move forward


I am currently using doing the Javascript course and I am very stuck and cannot move forward.

var quarter=function(number)
{console.log( number /4);
if (quarter(8) % 3 === 0 ); {
console.log("The statement is true");
else {
console.log("The statement is false");

This is the code I am using and the syntax error, it says that it is expecting an identifier and instead saw 'else'

Please help I am unsure what I did wrong!



this line:


the semi-colon and closing curly bracket are in the wrong order

your quarter function should return number divided by 4, not log it to the console

if (quarter(8) % 3 === 0 ); // unnecessary semi-colon

see comment

after 8 is being divided by 4, its no longer divisible by 3. Pick a number which is divisible by 3 after being divided by 4


I knew I was missing a return in there somewhere!
thanks for explaining it to me there is a lot to take in!


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