Answers for "js named parameters"

1

js named parameters

myFunction({ param1 : 70, param2 : 175});

function myFunction({param1, param2}={}){
  // ...function body...
}

// Or with defaults, 
function myFunc({
  name = 'Default user',
  age = 'N/A'
}={}) {
  // ...function body...
}
Posted by: Guest on July-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language