operators - Why # character is special in javascript? -


most of characters prohibited part of variable names in js have special meaning:

  • &, *, %, ^, etc. operators;
  • @ used declaring decorators;
  • branches (){}[] vital part of language;
  • _ , $ have no special meaning can used variable names.

what # char? why special?

there nothing special #. it's 1 of many characters no valid unicode identifier start or identifier continue. better question might have been makes $ , _ special became valid identifier parts?

what might make special it's 1 of few printable ascii characters invalid identifier names not used punctuators anywhere else in ecmascript 1. there are


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -