nas5w / javascript-tips-and-tidbits

A continuously-evolving compendium of javascript tips based on common areas of confusion or misunderstanding.
MIT License
1.2k stars 73 forks source link

Tiny Correction 2 #5

Closed JackLingwood closed 5 years ago

JackLingwood commented 5 years ago

It says: console.log(introduce(person)); // "I'm Eddie and I'm 24 years old!"

"console.log(introduce(person)); " produces "undefined" in the console log. The function does not return anything.

Maybe it should just be: introduce(person)

The introduce method already has console.log.