Dev.to WebDev 🛠 Dev 👁 0

Day 10: Learning JavaScript Parameters, Arguments & If-Else Conditions 🚀

Today is Day10 of my web development learning journey. I contonued learning javascript and leraned about function,parameters,arguments and if-else condition. 1. Function Parameters function greet(name) {

Today is Day10 of my web development learning journey. I contonued learning javascript and leraned about function,parameters,arguments and if-else condition.

1. Function Parameters


function greet(name) {
console.log("Hello " + name);
}

2. Function Arguments

Arguments are the actual values that we pass to a function when we call it.
greet("Saravanan");

3.If-else condition

The if block runs when the condition is true.

If the condition is false, the else block runs.

`let age = 20;

if (age >= 18) {
console.log("Eligible");
} else {
console.log("Not eligible");
}`

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.