Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascriot function

// Five examples of non-arrow function expressions

function (x) { return x + x + x  }

function (s, n) { return s.length > n  }

function (p, n, r, t) { return p * Math.pow(1 + (r / n), n * t)  }

function () { return Math.random() * 100  }

function (x, y) {
  let xSquared = x * x
  let ySquared = y * y
  return Math.sqrt(xSquared + ySquared)
}
Source by cs.lmu.edu #
 
PREVIOUS NEXT
Tagged: #Javascriot #function
ADD COMMENT
Topic
Name
9+3 =