Understanding Operator Precedence in JavaScript
Introduction I once had an embarrassing moment while trying to extract the current year. I wrote code like this: new Date().getFullYear() At that moment, I felt uncertain because I wasn't sure whether the . operator or the new keyword executes first. I quickly tested it in the console and—phew—no er...