Back

Shubham

Fearlessย โ€ขย 1m

๐Ÿš€ Day 2 of 21 โ€“ JavaScript Learning Journey Topic: Operations & Conditional Statements ๐Ÿ”น Operations in JavaScript Arithmetic: + - * / % Assignment: = += -= Comparison: == === != > < >= <= Logical: && || ! ๐Ÿ”น Conditional Statements // if statement if (age >= 18) { console.log("You can vote!"); } // if...else if (num % 2 === 0) { console.log("Even"); } else { console.log("Odd"); } // if...else if...else if (marks >= 90) { console.log("Grade A"); } else if (marks >= 60) { console.log("Grade B"); } else { console.log("Grade C"); } // switch statement switch(day) { case 1: console.log("Monday"); break; case 2: console.log("Tuesday"); break; default: console.log("Other Day"); } โœจ Key Takeaway: Operations let you calculate & compare, while conditional statements help your code make decisions. ๐Ÿ“Œ Stay tuned for Day 3 โ€“ Loops in JavaScript ๐Ÿ”„ #21DayJavaScript #JavaScript #Coding #LearnToCode

1 Reply
1
16
Replies (1)

More like this

Recommendations from Medial

sai akhilesh

Student @Geethanjali...ย โ€ขย 1y

What is conditional statements in Programming https://youtube.com/shorts/PC3KnjMxKV4?feature=share #javascript #programming #webdevelopment

Reply
3
Image Description
Image Description

Vagle

Hakuna matataย โ€ขย 10m

The perfect if else statement ๐Ÿคฃ

5 Replies
6

Shubham

Fearlessย โ€ขย 1m

Day 10/21 โ€“ JavaScript: Callback, Promise & Async/Await Today I learned how JavaScript handles asynchronous tasks like API calls, file loading, or timers. โšก ๐Ÿ”น Callback โ€“ a function passed into another function function fetchData(cb) { setTimeou

See More
Reply
1
Image Description

Sanskar

Keen Learner and Exp...ย โ€ขย 3m

Day 2 of learning python as a beginner. Topic: Conditional Expression Conditional expression pose a condition (if and Else statements). They help program take decision based on the condition given. They can be used inside a function or while assign

See More
4 Replies
4
15

Shubham

Fearlessย โ€ขย 1m

Day 05/21 โ€“ JavaScript Functions & Methods Today I explored one of the most powerful concepts in JavaScript: Functions & Methods. ๐Ÿš€ ๐Ÿ”น Functions are blocks of code designed to perform a specific task. They help in reusability and make code cleaner

See More
Reply
1

sai akhilesh

Student @Geethanjali...ย โ€ขย 1y

๐ŸŽ‰ The Wait is Over! ๐ŸŽ‰ The video is finally out! ๐Ÿ“ข Watch JavaScript Conditional Statements & Ternary Operator - Full Tutorial & Examples now on Learn With Akhilesh! ๐Ÿš€๐Ÿ“š๐Ÿ’ป Master JavaScript conditionals and the ternary operator with my step-by-s

See More
Reply
3

Shubham

Fearlessย โ€ขย 23d

Day 11/21 โ€“ JavaScript API Calls ๐ŸŒ Today I explored how to fetch data from APIs in JavaScript using async/await. Copy code Javascript async function getUsers() { try { let response = await fetch("https://jsonplaceholder.typicode.com/users");

See More
Reply
2

Vagle

Hakuna matataย โ€ขย 4m

Startup: โ€œWe use AI.โ€ Reality: One if-else statement and a prayer to OpenAI.

Reply
7
Image Description

Rohit Gupta

Aspiring Web Develop...ย โ€ขย 1y

#day29 of #100DaysOfCode #100daysofcodechallenge Today I make TO-DO App using JavaScript. I use while and for loops also if and else if condition.. For adding and deleting from list I use prompt Command.... #Javascript #Connect #Connections #tech

1 Reply
10

Shubham

Fearlessย โ€ขย 1m

Day 09/21 โ€“ JavaScript Classes & Objects Today I explored Classes & Objects in JavaScript โ€“ the building blocks of Object-Oriented Programming (OOP). ๐Ÿš€ ๐Ÿ”น Objects = collections of data & methods ๐Ÿ”น Classes = blueprints to create objects Example:

See More
Reply
8

Download the medial app to read full posts, comements and news.