8) Functions, return and if/else


What's the mistake? Can't figure it out.

varQuarter = function(number)

return number/4;
if (quarter(48)%3===0) {
console.log("The statement is true");
} else {
console.log("The statement is false");

Replace this line with your code.



Example of function expression:

var x = function (a, b) {
   return a * b

So, review your function.


Still it didn't work


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



You have to have a space between var and quarter.


var quarter = function (number) {...}

var is a keyword
quarter is a function name
number is an argument


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