JavaScript syntax
JavaScript syntax // How to create variables: var x; let y; // How to use variables: x = 5 ; y = 6 ; let z = x + y; The two most important syntax rules for fixed values are: 1. Numbers are written with or without decimals: 10.50 1001 2. Strings are text, written within double or single quotes: example: "John Doe" 'John Doe' JavaScript Variables In a programming language, variables are used to store data values. JavaScript uses the keywords var , let and const to declare variables. An equal sign is used to assign values to variables. In this example, x is defined as a variable. Then, x is assigned (given) the value 6: example : let x; x = 6 ; JavaScript Operators JavaScript uses arithmetic operators ( + - * / ) to compute values: example : JavaScript uses an assignment operator ( = ) to assign values to variables: example : let x, y;...