Introduction to functions


Please, i have difficulties with my syntax
// This is what a function looks like:

var divideByThree = function (300) {
var val = 300 / 3;

// On line 12, we call the function by name
// Here, it is called 'dividebythree'
// We tell the computer what the number input is (i.e. 6)
// The computer then runs the code inside the function!

i did this but sill they are saying still there is a problem with your syntax

2. js - introduction functions

A function parameter cannot be a number alone,

change the 300 above to a letter or word,

and here, remove this variable

use a return statement and divide your named parmeter by 3,

return named_param / 3


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