Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Passing Parameter as Default Values

function sum(x = 1, y = x,  z = x + y) {
    console.log( x + y + z );
}

sum(); // 4
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #javascript #Passing #Parameter #Default #Values
ADD COMMENT
Topic
Name
3+7 =