JS
challenger
Home
JavaScript Basics
functions II
Declare a rest parameter
Declare a rest parameter
The functino
func
declare a parameter
x
and returns the property
length
of
x
. Transform
x
into a
rest parameter
so that its value is of type array with legnth 2.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console