If you want to know whether your Unicode variable is acceptable or not, you can check it at https://mothereff.in/js-variables.
Using comments helps us to understand code and its purpose. Each programming language has its own set of syntax when it comes to writing comments.
Single-line comments: Single-line comments begin with //. It will ignore all the things immediately after // syntax until the end of that line. It is also known as inline comments.
// Single-line comment
Multi-line comments: Multi-line comments begin with /* and end with */. You can write as many lines as you want in between these syntaxes.
- Start with /** in a blank line.
- End with */ at the end line.
- Use * at the beginning of each line between the start and the end.
* Multi-line comment as
* block comments
In practice, you will most likely keep a well-defined style of indentation and adhere to what people commonly use.
We define as literal a value that is written in the source code, for example, a number, a string, a boolean, or also more advanced constructs, like Object Literals or Array Literals:
An identifier is a sequence of characters to identify a variable, a function, or an object. There are specific rules for identifiers as follows,
- It should start with a letter (it could be any allowed character like emoji 😄 or Unicode words), the dollar signs $, or an underscore _.
- It can contain digits.