Last updated 2 years ago
JS ⟩ grammar ⟩ keyword ⟩ reserved word ⟩ as property name is allowed
reserved word can be used as property name
const obj = { var: 'joe' }; // ❗️ "var" is reserved word obj.var; // ⭐️ 'joe'
Lexical grammar ⟩ keywords ⟩ reserved words
SyntaxError: "x" is a reserved identifier
ECMA spec ⟩ 12.6.2 Keywords and Reserved Words ⟩ Reserved Words ⭐️
TeckTutorialHub ⟩ JavaScript Keywords & Reserved Words ⭐️