scrimba
Learn Modern JavaScript
Set Default Parameters for Your 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

Set Default Parameters for Your Functions
AboutCommentsNotes
Set Default Parameters for Your Functions
Expand for more info
index.js
run
preview
console
const increment = (function() {
return function increment(number, value) {
return number + value;
};
})();
console.log(increment(5, 2));
console.log(increment(5));
Console
[
16
,
1764
,
36
]
,
index.html
-0:51