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

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

html - How to custom Bootstrap grid height? -