How to use destructuring function arguments in JavaScript

1 Answer

0 votes
function userData({name,age}){
   console.log(name, age)

}

userData({name:"tom", age:53})




/*
run:

tom 53

*/

 



answered May 21, 2021 by avibootz
...