No video

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

  Рет қаралды 87,995

Dani Krossing

Dani Krossing

Күн бұрын

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

Пікірлер: 91
@randerins
@randerins 2 жыл бұрын
Not only very useful and straight forward, but you clearly also have some empathy for beginners. Really appreciate that!
@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 🇺🇬.
@omarghabawi1913
@omarghabawi1913 Жыл бұрын
Four years later & still the best JS course on KZfaq. Thanks a lot!
@ararahrah1
@ararahrah1 2 жыл бұрын
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!...
@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!!!
@erfanm1206
@erfanm1206 3 жыл бұрын
wowwwwwwwwwww! you explain it very goooood, thank you so muchhhh!
@rwilhelm23
@rwilhelm23 4 жыл бұрын
Not all heroes wear capes! You're brilliant! thank you so much for helping us simpletons.
@josephsamson412
@josephsamson412 10 ай бұрын
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👍👍
@Benbenbenbenbenbenjamin
@Benbenbenbenbenbenjamin 6 жыл бұрын
Love the tutorials! Waiting patiently for the next one.
@secretoflife2676
@secretoflife2676 2 жыл бұрын
Mange tak Daniel! Denne lille video var en stor hjælp
@velbalakrishnan956
@velbalakrishnan956 Жыл бұрын
Excellent teaching. Thumbs Up for U bro.
@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 :)
@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!
@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!
@ebesquin
@ebesquin 3 жыл бұрын
Thank you so much Dani for your excellent tutorials
@neoTriny
@neoTriny 3 жыл бұрын
Good one, very clear, salute you boss
@sumiiluv
@sumiiluv Жыл бұрын
This video was so helpful. Thank you so much
@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 😂
@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
@mosammatjinnatharakhandake9146
@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
@RadoHudran
@RadoHudran 2 жыл бұрын
Was looking for the "OR" statement and found your video. Thx a lot
@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 :)
@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!
@amandadelongchamp3599
@amandadelongchamp3599 5 жыл бұрын
You're great teacher!
@afrobaba1248
@afrobaba1248 6 жыл бұрын
Good job as usual. Thank u man!
@Dani_Krossing
@Dani_Krossing 6 жыл бұрын
Thanks :)
@Dadly
@Dadly 6 жыл бұрын
Awesome video!
@Aishcream
@Aishcream 2 жыл бұрын
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
@pleasedontsub9700
@pleasedontsub9700 5 жыл бұрын
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: =>=
@InnesHeppler
@InnesHeppler 6 жыл бұрын
very good - clearly explained
@dlyzei4722
@dlyzei4722 4 жыл бұрын
4:35 you can replace this && with a comma
@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.
@mariaramirezr.4234
@mariaramirezr.4234 4 жыл бұрын
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
@argenisaguilar9045
@argenisaguilar9045 3 жыл бұрын
Great!!...thank you very much..
@Vishal-Travel-Diaries
@Vishal-Travel-Diaries 3 жыл бұрын
nice one
@abumd.nayeemkhan1025
@abumd.nayeemkhan1025 4 жыл бұрын
very helpful video .
@randerins
@randerins 2 жыл бұрын
10:16 That video part could turn into a legendary meme
@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
@DeepakRai-tf8un
@DeepakRai-tf8un 6 жыл бұрын
you are great sir
@joyvideos1802
@joyvideos1802 4 жыл бұрын
Nice lesson
@ihzaq
@ihzaq 3 жыл бұрын
Nice
@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
@poterealpopolomalaysia3540
@poterealpopolomalaysia3540 Жыл бұрын
what if the var value is a text?
@whysoseriousjoker6727
@whysoseriousjoker6727 6 жыл бұрын
good job, keep it up
@thomaswaligora8470
@thomaswaligora8470 4 жыл бұрын
Thx!
@user-or7ji5hv8y
@user-or7ji5hv8y 4 жыл бұрын
is case statements allowed in js?
@epic_waffle2359
@epic_waffle2359 4 жыл бұрын
6:49 so you can say you just had a phone call from a salesman :)
@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
@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.
@marcoelizondo1246
@marcoelizondo1246 4 жыл бұрын
Never use == Always use === because you want to ensure you are comparing the data types input. This 4:40 will trip you up immensely.
@chrisbors527
@chrisbors527 6 жыл бұрын
can toy show how to do a beautiful sidebar with html and css??
@francisbrixgabrielampeloqu1935
@francisbrixgabrielampeloqu1935 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 :)
@tahzeemvally9271
@tahzeemvally9271 Жыл бұрын
The if part you kinda confused me bcuz i didnt understand comparison operators 😭and statement
@SecretDuck
@SecretDuck 5 жыл бұрын
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
@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”
@angelinecaponpon9065
@angelinecaponpon9065 6 жыл бұрын
👌👌👌👌
@musicjunkie421
@musicjunkie421 5 жыл бұрын
MMTUTS >= GOAT
@Layilicious
@Layilicious 5 жыл бұрын
The commercials in between videos are very distracting and annoying.... nice course though
@jamesframe2705
@jamesframe2705 6 жыл бұрын
Ahhh shit it the last on, noooooooo
@alextoryanik2000
@alextoryanik2000 5 жыл бұрын
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 5 жыл бұрын
I had the same thought :)
@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
@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 жыл бұрын
@sayedhasancp
@sayedhasancp 6 жыл бұрын
My concentration has been lost in your mobile activity ........... :( :( :(
@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...
@friedchicken5227
@friedchicken5227 4 жыл бұрын
Nice
娜美这是在浪费食物 #路飞#海贼王
00:20
路飞与唐舞桐
Рет қаралды 5 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 4,8 МЛН
JavaScript if else (tutorial)
6:22
Programming with Mosh
Рет қаралды 340 М.
娜美这是在浪费食物 #路飞#海贼王
00:20
路飞与唐舞桐
Рет қаралды 5 МЛН