scrimba
Learning JavaScript
Learning JavaScript: Functions
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Learning JavaScript: Functions
AboutCommentsNotes
Learning JavaScript: Functions
Expand for more info
index.js
run
preview
console
// Functions













































// Try it out! Here's a simple exercise:
//
// write a function that returns a function that raises a number to a power specified as an
// argument to the previous function. That is, I want to do something like this:
//
// const cubed = buildFunction(3);
// console.log(cubed(2)); // prints 8
//
// to raise a number to a power, use Math.pow(x, y)
//
// Math.pow(4, 3) -> 64
Console
"Hello from JavaScript"
,
index.html
-12:29