JS ⟩ error ⟩ SyntaxError ⟩ unexpected number❗
⛔ SyntaxError:unexpected number❗
replit:dot notation
// object let obj = {}; // ⭐️ dot notaton obj.$1 = 'joe'; // ✅ valid identifier obj.var = 'OK'; // ✅ reserved word is allowed❗ // -------------------------------------------- // obj.1 = 'bad'; // ❌ invalid identifier // ^^ // ⛔ SyntaxError: Unexpected number // --------------------------------------------
dot notation (.)
Last updated 2 years ago
Was this helpful?