js named parameters

Solutions on MaxInterview for js named parameters by the best coders in the world

showing results for - "js named parameters"
Luca
08 Jan 2017
1myFunction({ param1 : 70, param2 : 175});
2
3function myFunction({param1, param2}={}){
4  // ...function body...
5}
6
7// Or with defaults, 
8function myFunc({
9  name = 'Default user',
10  age = 'N/A'
11}={}) {
12  // ...function body...
13}
14