We're a place where coders share, stay up-to-date and grow their careers.
very nice patterns, but I think on the number 6 you wanted to put it this way:
const myObject = { toName, punctuation, fromName }; // Before function sayHello(myObject) { return `Hello, ${myObject.toName}${myObject.punctuation} From, ${myObject.fromName}.` } sayHello(customerName, end, myName); // After function sayHello({ toName, punctuation, fromName }) { return `Hello, ${toName}${punctuation} From, ${fromName}.` } sayHello(myObject);
very nice patterns, but I think on the number 6 you wanted to put it this way: