DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
3+7 =
Submit