I started reading JavaScript: the book "Good Details" and got confused on the first pages (more precisely, 7 and 9) on the railway schemes.
There are charts for the name and string literal. (you can see the diagrams here )
As I know, names in JavaScript can begin with letters, as well as with an underscore or even β$β. Following the diagram of a book, it can only begin with letters.
For a string literal, imagine that you want to represent the string as follows: "\\".
Following the diagram, this is not possible (it seems that after the "escaped character" is required "any unicode character except" and \ and contol ".
Are these errors in the book? Or am I missing something?
source share