Lesson 8- Functions, returns, if/else


#1

https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/1/3?curriculum_id=506324b3a7dffd00020bf661#


SyntaxError: Unexpected identifier


var quarter = function (number)
{
return number / 4
}


if quarter(12 % 3) === 0 ) {
  console.log("The statement is true");
} 
else 
{
  console.log("The statement is false");
}


#2

you should not have this:

as a parameter,.

you should have the condition out side the calling of quarter


#3

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