JS Syntax
Understand the basic syntax rules of JavaScript.
Examples
Declaring Variables
How to declare and assign values to variables.
let x;
x = 6;
let y = 5;
let z = x + y;
console.log(z);Using Operators
Doing basic arithmetic with operators.
let a = 10;
let b = 5;
let sum = a + b;
let product = a * b;
console.log("Sum:", sum);
console.log("Product:", product);String Concatenation
Combining strings (text) together.
let firstName = "John";
let lastName = "Doe";
let fullName = firstName + " " + lastName;
console.log(fullName);Test Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.