Pages

Destructuring !

const user = {nom: 'me', age: 54, code: 'secret'};

const old = (function ( para ) {
    return function( {nom} ) {
  return {nom}
}})();
console.log(old(user))


const userSecure = ( ({nom, age}) => ({nom, age}) )(user);