Learn JavaScript
Lesson 1 - Introduction To JavaScript
Lesson 2 - Basic JavaScript Syntax
Lesson 3 - Control Flow
Lesson 5 - Basic Data Structures
Lesson 6 - Basic String Operations
Lesson 7 - Basic Array Operations
Lesson 8 - Exception Handling
Lesson 9 - Packages
Lesson 10 - User Input
Almost all functions we declare in our regular programming take some input known as parameters. Parameters allow you to share data with a function for processing.
Parameters are specified within the parentheses ()
when defining the function.
function greet(name) { console.log("Hello, " + name + "!"); } greet("Alice");
Here, the function greet()
takes a person's name
as a parameter and greets them. Try to pass your name.