JavaScript Variable Names
In schappo.blogspot.co.uk/2015/06/php-variable-names.html I explained how PHP variable names are determined at the byte level. JavaScript variable names are determined at a higher level and are defined in terms of Unicode Properties and General Categories. Letʼs start with some simple Basic Latin variable name examples. Valid Names: nottingham nottingham8 Invalid Name: 8nottingham where 8 is Unicode character U+0038 DIGIT 8. The last name, above, being invalid because it begins with a digit. We are in the Unicode age and so do not need to restrict ourselves to Basic Latin. Some time ago I asked myself whether the same Basic Latin rule, an initial digit is invalid , applies to other Scripts and yes it does (well mostly). Valid Devanagari Names: नाटिंघम नाटिंघम६ Invalid Devanagari Name: ६नाटिंघम where ६ is Unicode character U+096C DEVANAGARI DIGIT SIX Valid Thai Names: นอตทิงแฮม นอตทิงแฮม๘ Invalid Thai Name: ๘นอตทิงแฮม...