Functions vs Classes in JavaScript — the confusion, explained.

Everyone uses them. Few truly know when to pick one over the other — or what’s really happening under the hood when JavaScript runs your…