#14 Switch Statement in JavaScript

preview_player
Показать описание

More Learning :

Рекомендации по теме
Комментарии
Автор

I have completed BCA 7 years ago i could not study further due to personal problems and i joined my family business but recently i gained interest in web development so here i am watching your tutorial...watched too many tutorials of javaScript but your teaching style is unique... Thank you sir..

veedbxv
Автор

2:15
let day = "mon"; // Example: Set the day to "mon"
let result;

if (day === "mon") {
console.log("Alarm time: 7am");
} else if (day === "tue") {
console.log("Alarm time: 8am");
} else if (day === "wed") {
console.log("Alarm time: 9am");
} else {
console.log("No alarm scheduled for this day.");
}

raghuvarandcruzjr
Автор

Hello Sir
2:15

assignment -

let a="Friday";

if(a==="Monday")
console.log("7 am");

else if(a==="Tuesday" || a==="Wednesday" || a==="Thursday")
console.log("4 am");

else if(a==="Saturday" || a==="Sunday")
console.log("8 am");

else
console.log("9 am");

vedantbarhate
Автор

I have learned a lot from your JS tutorial more than any of the paid courses I have been through. You are doing a huge service for free.

thisaruwithanapathirana
Автор

Never expecting such a deep dive in language in just one free video ...
❤️❤️

babayaga
Автор

let day = "Thursday";
if (day === "Monday") {
document.write("7 am");
} else if (day === "Tuesday" || "Wednesday" || "Thursday") {
document.write("4 am");
} else if (day === "Friday") {
document.write("9am");
} else {
document.write("8 am");
}👍

vaibhavsharma
Автор

I understood. Being a computer teacher in icse affiliated school your lecture helps me a lot.

ManjotSinghComputerApplication
Автор

Tysm for this series. Its been a great pleasure to have Professionals like you who come forward and help the youth by doing such things. Thanks a lot

jayeshjadhav
Автор

5:51 "7am, Get lost" 🤣 I love this guy!

cmdaltctr
Автор

Finding your content informative and helpful on my coding journey! Thank you so much for making these concepts so easy to understand!

tammycollinse
Автор

Youtube liberated education. Thanks to the internet and the good people who are teaching us for free. May you get all what you desire.

haibaidzokwomandre
Автор

@2.26 with the help of if-else
/*mon- 7am
tue= thrus=4am
fri =9am
sat-sun=8am
*/
//let day="Monday";
let day="thrusday"
if(day==="Monday"){
console.log("wake up its 7 am");
}
else if(day==="tuesday" || "thrusday")
{
console.log("wake up its 4 am");
}
else if(day==="friday")
{
console.log("wake up its 9am");
}
else
{
console.log("wake up its 8 am")
}

premlatakumari
Автор

Thank you for this valuable information! JS is the most popular software development language right now. As web platforms became more complex, they needed to simultaneously process a lot of actions and react to users’ interactions. The use of a specific language that was designed for a browser made development easier.

Jelvix
Автор

I was learning JS on FCC and just couldn't get it. Explanation on this video was so simple, I'm currently paused at 3:15 and managed to pass the challenge on FCC. I'm definitely subscribing!

iUsefull
Автор

I'm really happy that you are treating this as a programming language and not as a web development tool.

NumberVectors
Автор

If - else statement would be:
function alarm(day) {
if (day == "Monday") {
console.log("7am");
} else if (day == "Tue") {
console.log("4am");
} else if (day == "Wed") {
console.log("4am");
} else if (day == "Thurs") {
console.log("4am");
} else if (day == "Fri") {
console.log("9am");
} else if (day == "Sat") {
console.log("8am");
} else if (day == "Sun") {
console.log("8am");
}
}

francismainakabutha
Автор

First time i got idea of "break" usage in switch case... ty Navin Sir

surajdudhe
Автор

great work, i find that your explanations are really easier to grasp, thanks for the great work

okellowilliam
Автор

const prompt = require("prompt-sync")()
let days = {
mon:"7am",
tue:"4am",
thu:"4am",
fri:"9am",
sat:"8am",
sun:"8am"
}
let today = prompt("today is ");

console.log(days[today])

Unknwn_Light_
Автор

Looks great teaching skills and methodology is extremely easy to make the logic very clear. Children can benefit hugely by your daily classes. Keep it up. Great effects SIR

mohdali-yqgq