Тёмный

11: How to Create Conditions in JavaScript | Conditional Statements | JavaScript Tutorial 

Dani Krossing
Подписаться 483 тыс.
Просмотров 88 тыс.
50% 1

How to Create Conditions in JavaScript | Conditional Statements | JavaScript Tutorial. In this JavaScript tutorial you will learn about conditional statements which are used to create logic in JavaScript applications.
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Material for this lesson: / lesson-material-42361704

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 91   
@omarghabawi1913
@omarghabawi1913 Год назад
Four years later & still the best JS course on RU-vid. Thanks a lot!
@Namuggah
@Namuggah 2 года назад
Hey Dani, I just wanted you to know that you have made my school so much better with these videos. Thank you so much. Sending you lots of love and light from Uganda 🇺🇬.
@randerins
@randerins 3 года назад
Not only very useful and straight forward, but you clearly also have some empathy for beginners. Really appreciate that!
@akashstores390
@akashstores390 3 года назад
Your accent is so clear to understand! I just started to learn from you... We will meet again in another Video Dani. You are amazing. Keep it up. Thank you!
@SecretDuck
@SecretDuck 6 лет назад
3 SJWs disliked cos you said there's only 2 genders ;D By the way mmtuts, would you ever do a tutorial for BootStrap 4?
@awantomagaret7390
@awantomagaret7390 5 лет назад
Check scrimba.com they have a free and easily to learn tutorial on bootstrap 4
@calibr0636
@calibr0636 5 лет назад
SecretDuck I actually added another statement for the “other” gender just to make it fair so that if someone looks through my code (for some reason) without me knowing, they’re not going to get offended.
@JinKazama1993
@JinKazama1993 5 лет назад
I am offended because he just assumed my species and my age! I identify as a Martian and I am -592 years old! /s
@ojface
@ojface 5 лет назад
10 months later, this is still hilarious, was totally thinking the same thing!..LOL xD
@RadoHudran
@RadoHudran 2 года назад
Was looking for the "OR" statement and found your video. Thx a lot
@arnoldomondi7423
@arnoldomondi7423 6 лет назад
hi, Daniel let me just say that 96% of what i know i got it from this page but i was kind of requesting if you can start on building actual projects it will go a long way and again just a suggeston
@ebesquin
@ebesquin 3 года назад
Thank you so much Dani for your excellent tutorials
@erfanm1206
@erfanm1206 3 года назад
wowwwwwwwwwww! you explain it very goooood, thank you so muchhhh!
@sumiiluv
@sumiiluv Год назад
This video was so helpful. Thank you so much
@Benbenbenbenbenbenjamin
@Benbenbenbenbenbenjamin 6 лет назад
Love the tutorials! Waiting patiently for the next one.
@ararahrah1
@ararahrah1 3 года назад
I'm taking a bootcamp rn and I wish I found your page before starting. You have helped me understand things the bootcamp tried teaching. Thank you so much!
@DavidTheITGuy.
@DavidTheITGuy. 2 года назад
Wiz him one doesn't surely need AcampBoot!...
@josephsamson412
@josephsamson412 11 месяцев назад
I have been following up your videos you are one of the outstanding instructor with the way you explain everything I love it, and length of the vid as well make's me wants to watch more ❤❤❤though it old vid when you understand it same as present and what is good it's good👍👍
@rwilhelm23
@rwilhelm23 4 года назад
Not all heroes wear capes! You're brilliant! thank you so much for helping us simpletons.
@velbalakrishnan956
@velbalakrishnan956 Год назад
Excellent teaching. Thumbs Up for U bro.
@Saladcreamboi
@Saladcreamboi Год назад
It's taken me ages to wrap my head around the fundamentals of JS. It's actually now sinking in with your playlists. Bare in mind I've never written a line of code in my life. Thank you so much!!!
@mexcalgt
@mexcalgt 4 года назад
Dude I am very thankful for your time invested on this videos it is great help and a very great way to learn.... Gracias totales!
@BenHewart
@BenHewart 4 года назад
quick question..... with regards the if(age > 18) and if(gender == "male") could you not put them together in one if statement? so if(age >=18 && gender == "male") would this work also? I also didnt know you could put 2 if statements after one another? these videos are great!!
@BKofficer23
@BKofficer23 4 года назад
Ben, I think the following would work: if((age >=18) && (gender == "male"))
@BKofficer23
@BKofficer23 4 года назад
But I don't know.
@secretoflife2676
@secretoflife2676 2 года назад
Mange tak Daniel! Denne lille video var en stor hjælp
@abumd.nayeemkhan1025
@abumd.nayeemkhan1025 4 года назад
very helpful video .
@Aishcream
@Aishcream 3 года назад
Woow the penny has just dropped! Thanks for the super clear explanation. I just have one question. So it is if () {} but when you did the gender age one, I noticed there was an additional { but not a closing one. do you use the to separate the if statements where you have more than one if statement as in this case? Hope you can help. Thanks again for this video :D
@epic_waffle2359
@epic_waffle2359 4 года назад
6:49 so you can say you just had a phone call from a salesman :)
@neoTriny
@neoTriny 3 года назад
Good one, very clear, salute you boss
@mariaramirezr.4234
@mariaramirezr.4234 5 лет назад
To write de pipe simbol in Windows: Alt + 1 2 4
@lolpantsification
@lolpantsification 4 года назад
Lol what? There's a key on your keyboard for it. lol
@tahzeemvally9271
@tahzeemvally9271 Год назад
The if part you kinda confused me bcuz i didnt understand comparison operators 😭and statement
@marcoelizondo1246
@marcoelizondo1246 5 лет назад
Never use == Always use === because you want to ensure you are comparing the data types input. This 4:40 will trip you up immensely.
@Dadly
@Dadly 6 лет назад
Awesome video!
@dlyzei4722
@dlyzei4722 4 года назад
4:35 you can replace this && with a comma
@pleasedontsub9700
@pleasedontsub9700 6 лет назад
what would I do if I wanted to both check the datatype and make sure a variable is greater or less than a number both at the same time. Great videos! very understandable!
@TheBest-sp3co
@TheBest-sp3co 4 года назад
Use this: =>=
@randerins
@randerins 3 года назад
10:16 That video part could turn into a legendary meme
@codenlighten54
@codenlighten54 4 года назад
Thanks. This has been my most difficult subject so far in javascript as I'm learning it.
@khushalrajput4538
@khushalrajput4538 4 года назад
JavaScript is pain in ass to learn 😂
@mosammatjinnatharakhandake9146
One of the best tutorials of JavaScript very easy to understand the concept. And exercises provided are very good. Can you plz upload more projects for html, css and JavaScript
@fuzzydark1395
@fuzzydark1395 5 лет назад
what's the difference between using two equal signs and using three equal signs?
@josepharenas8905
@josepharenas8905 5 лет назад
1=="1" >> True 1==="1" >> False
@whysoseriousjoker6727
@whysoseriousjoker6727 6 лет назад
good job, keep it up
@airdraagonstream5538
@airdraagonstream5538 3 года назад
Ah, I've finally have found how to type not eaqual correctly in JavaScript! Thank you so much. I haven't found other tutorials out there (video or written) that talk about it. One big like :)
@Layilicious
@Layilicious 5 лет назад
The commercials in between videos are very distracting and annoying.... nice course though
@Asma-og4tx
@Asma-og4tx 2 года назад
This video was really helpful our course did not teach this so we had to find a video so I'm grateful for this :)
@francisbrix03
@francisbrix03 3 года назад
how come you're writing all of these with colors? how can I do that? I'm sorry. newbie here
@Dani_Krossing
@Dani_Krossing 3 года назад
I'm using a different Color Scheme, so don't worry about variables not turning green :)
@sonnyl2915
@sonnyl2915 Год назад
I thought only use Else is the final statement but there were multiple If and Else in this. Lol
@Dani_Krossing
@Dani_Krossing Год назад
Else is the final statement 🙂 “else if” is different than “else”
@misterimposterroot4060
@misterimposterroot4060 5 лет назад
Well looks like we may need to set up a defense for him rally the knights and keks lol the SJWs are coming lol but for real we got yah back
@rheaclements1193
@rheaclements1193 Год назад
I’m so new at this, your videos on html and css saved me! I wonder if someone with more experience can comment on the usefulness of this series, my classroom instructor said we should never use var. Is it still useful to watch this series to get the basics down?
@Dani_Krossing
@Dani_Krossing Год назад
I also get to “not using var” in this course here, so don’t worry about thinking it’s outdated or anything like that. 🙂 I only use var at the start of the course because I know most people know about it, and I wanna ease people into JavaScript as much as possible. 😊
@rheaclements1193
@rheaclements1193 Год назад
Ok perfect!
@poterealpopolomalaysia3540
@poterealpopolomalaysia3540 Год назад
what if the var value is a text?
@vojka2973
@vojka2973 6 лет назад
I'm pretty sure your book saver is up side down! LUL am I right ?? Great video btw! I was your subscriber since 10k
@amandadelongchamp3599
@amandadelongchamp3599 5 лет назад
You're great teacher!
@afrobaba1248
@afrobaba1248 6 лет назад
Good job as usual. Thank u man!
@Dani_Krossing
@Dani_Krossing 6 лет назад
Thanks :)
@Vishal-Travel-Diaries
@Vishal-Travel-Diaries 3 года назад
nice one
@gladstonross12
@gladstonross12 6 лет назад
just a note here guys.. the && operator could also be used to test both condition in the "if" statement ,, doing so would omit the need of the second if statement and you would get the same result. eg.. if (gender == "male" && age >= 18) { console.log(" *and you would log something here* ");}
@slapmyfunkybass
@slapmyfunkybass 5 лет назад
Gladston Ross No, that wouldn’t work here because if either statement failed the code in it would never run. In the video he first checks if they’re male, then checks their age - that shouldn’t be combined into a && statement.
@chrisbors527
@chrisbors527 6 лет назад
can toy show how to do a beautiful sidebar with html and css??
@argenisaguilar9045
@argenisaguilar9045 3 года назад
Great!!...thank you very much..
@ihzaq
@ihzaq 3 года назад
Nice
@user-or7ji5hv8y
@user-or7ji5hv8y 4 года назад
is case statements allowed in js?
@jamesframe2705
@jamesframe2705 6 лет назад
Ahhh shit it the last on, noooooooo
@InnesHeppler
@InnesHeppler 6 лет назад
very good - clearly explained
@joyvideos1802
@joyvideos1802 5 лет назад
Nice lesson
@friedchicken5227
@friedchicken5227 4 года назад
Nice
@thomaswaligora8470
@thomaswaligora8470 4 года назад
Thx!
@muramasa7537
@muramasa7537 6 лет назад
I am learning more easily here ! But what is === again ?
@Dani_Krossing
@Dani_Krossing 6 лет назад
It means "is the same as and same datatype". Awesome username btw!
@muramasa7537
@muramasa7537 6 лет назад
mmtuts thanku
@DeepakRai-tf8un
@DeepakRai-tf8un 6 лет назад
you are great sir
@musicjunkie421
@musicjunkie421 5 лет назад
MMTUTS >= GOAT
@angelinecaponpon9065
@angelinecaponpon9065 6 лет назад
👌👌👌👌
@adolfjamesurian6510
@adolfjamesurian6510 4 года назад
I dont know why this happens to me: function confirmPass() { var pass1 = document.getElementById("pass1"); var pass2 = document.getElementById("pass2"); var txt = "Please enter your password"; var txt2 = "Passwords do not match"; if(pass1 != pass2) { alert(txt2); } else if(pass1, pass2 == "") { alert(txt); } }
@adolfjamesurian6510
@adolfjamesurian6510 4 года назад
When the if(pass == pass2) itts not running the command inside the branket but its running the command in the else if(pass1 !=pass2) HELP?!!!!
@ArslanLatef
@ArslanLatef 6 лет назад
@alextoryanik2000
@alextoryanik2000 6 лет назад
I'm a little surprised by the fact that this didn't escalate into a gender debate in the comments xD
@Dani_Krossing
@Dani_Krossing 6 лет назад
I had the same thought :)
@sehitgoker5073
@sehitgoker5073 Год назад
wonder why didn t you catch a case suit yet with that anti woke propaganda of yours lol.
@Dani_Krossing
@Dani_Krossing Год назад
😂 yeah the video didn't age well into 2023...
@sayedhasancp
@sayedhasancp 6 лет назад
My concentration has been lost in your mobile activity ........... :( :( :(
Далее
Exercises: Conditional Statements - Javascript In Depth
23:49
🎙Пою РЕТРО Песни💃
3:05:57
Просмотров 1,3 млн
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24
If statements in JavaScript are easy 🤔
15:58
Просмотров 36 тыс.
JavaScript Pro Tips - Code This, NOT That
12:37
Просмотров 2,5 млн
JavaScript Conditionals #fullstackroadmap (Ep. 5.0)
15:57
🎙Пою РЕТРО Песни💃
3:05:57
Просмотров 1,3 млн