JavaScript is similar to other C/C++ style languages in its syntax, although it has moved further from it as goes through its own revisions. However, the basics of the language have stayed the same.
Case Sensitivity
JavaScript is a case sensitive language, unlike some other contemporary languages that were in the web sphere at the same time.
This is true for both identifier names (variables, classes, and function names), as well as built in keywords.
JavaScript coding standards use camel case, AKA humpback, notation.
Command Delimiters
Commands in JavaScript can be terminated in two different ways. That way, you can begin the next command.
First, and least commonly used, is to simply move to a new line. That exits the current command and lets us to move to the next line.
The more common method, because it is more C/C++ like, is to use a semi-colon at the end of a line of code. This allows for multiple commands of code to be on the same line. This is important for the minification process, which many websites use to reduce the download size and increase the speed of the website.
Standard Features
From here you can see how to use JavaScript:
- JavaScript Variables
- JavaScript Data Types
- Conditions with JavaScript
- Loops with JavaScript
- Functions in JavaScript
- Classes in JavaScript
- Closures in JavaScript
The Basics of JavaScript Syntax was originally found on Access 2 Learn
One Comment
Comments are closed.