If statements in JavaScript are easy 🤔

Поділитися
Вставка
  • Опубліковано 26 лип 2024
  • 00:00:00 example 1
    00:01:57 example 2
    00:02:53 booleans
    00:03:57 nested if AD
    00:07:01 else if
    00:10:07 == comparison operator
    00:11:06 project

КОМЕНТАРІ • 61

  • @BroCodez
    @BroCodez  11 місяців тому +13

    // IF STATEMENTS = if a condition is true, execute some code
    // if not, do something else
    const myText = document.getElementById("myText");
    const mySubmit = document.getElementById("mySubmit");
    const resultElement = document.getElementById("resultElement");
    let age;
    mySubmit.onclick = function(){
    age = myText.value;
    age = Number(age);

    if(age >= 100){
    resultElement.textContent = `You are TOO OLD to enter this site`;
    }
    else if(age == 0){
    resultElement.textContent = `You can't enter. You were just born.`
    }
    else if(age >= 18){
    resultElement.textContent = `You are old enough to enter this site`
    }
    else if(age < 0){
    resultElement.textContent = `Your age can't be below 0`;
    }
    else{
    resultElement.textContent = `You must be 18+ to enter this site`;
    }
    }


    My website

    Enter your age:

    submit

  • @Moon-xr9hr
    @Moon-xr9hr 3 місяці тому +1

    Thank you dude, i 'm loving your videos, keep up the good work!

  • @edipedipbulmaz
    @edipedipbulmaz 9 місяців тому

    Happy to see you back. Keep on, chad

  • @nguyenphulam2849
    @nguyenphulam2849 7 місяців тому

    Thanks for your series

  • @DeadlyKnight04
    @DeadlyKnight04 9 місяців тому +3

    This is where I am in school currently thank you so much bro…also you should play more games on 2nd channel

  • @l8ht
    @l8ht 20 днів тому

    Thanks for the tutorial

  • @helioobianchi
    @helioobianchi 4 місяці тому

    Thanks, bro. You're a real bro 💪

  • @xzex2609
    @xzex2609 9 місяців тому +4

    I did see his last js but unlike python I didn't follow along. the best way to follow along is that you create a minimal folder with three js html ,css files that are linked , use it as new project and drop one on the vscode icon and use OPERA floating window for the lessonns and you have your editors web page and in a small window bro , and try to do things ahead of him or at least don't copy and when the lessons done try to write it by yourself. some people find it hard to setup three files and open a web page but this way it just tooks a drag and drop

    • @l-fitness3590
      @l-fitness3590 6 місяців тому

      100% agree and after try experimenting also I personally made a full page for my self set up in different sections for each topic

  • @tricksforsolving2804
    @tricksforsolving2804 6 місяців тому

    Learning so much productive

  • @sayehghaderi9455
    @sayehghaderi9455 2 місяці тому

    So good ❤

  • @Xaviercomment586
    @Xaviercomment586 9 місяців тому +3

    bro please continue the react js series thank you!!

  • @pragathid7743
    @pragathid7743 2 місяці тому

    Sooo good 😊 plz do a full react course , Thanks in advance

  • @MrPvssy
    @MrPvssy 9 місяців тому +1

    Daddy Brocode teaches me lots

  • @xzex2609
    @xzex2609 9 місяців тому +2

    Recently in Vs code I got a console in the terminal , and I dont need to use a browser for consol.log logging , I think node.js do this , and if the contents doesn't involve Html context there is no need to open a browser , just a terminal will do

  • @Data_Falcon
    @Data_Falcon 2 місяці тому +1

    in my country 18 years old to drive and i'm from India

  • @demonx_xgod
    @demonx_xgod 3 місяці тому

    thanks

  • @Lurmog
    @Lurmog 9 місяців тому

    Can you do a series of videos for learning rust please? 🥺 (there is so much ressources available for learning rust likes the official Rust Book website, rust by example, rust by practice and rustlings)

  • @endisalihu6308
    @endisalihu6308 8 місяців тому

    Do a full react course bro : ]

  • @Abde473
    @Abde473 3 місяці тому +5

    bro casualy coding adult (18+) websites

  • @GiftMthimunye
    @GiftMthimunye 9 місяців тому

    Danko

  • @coolomar7804
    @coolomar7804 9 місяців тому +4

    I must be 18 years old to have a driving license in Egypt

    • @BroCodez
      @BroCodez  9 місяців тому

      I didn't know that. Interesting.

    • @coolomar7804
      @coolomar7804 9 місяців тому

      @BroCodez but I just found out that it's OK to ride a motorcycle at 16

    • @tricksforsolving2804
      @tricksforsolving2804 6 місяців тому

      Same thing in India also

  • @AndyBorzi
    @AndyBorzi 8 місяців тому

    17 in UK for driving licence

  • @deeplife9654
    @deeplife9654 9 місяців тому

    Hey bro make a video on Springboot

  • @NazneenNaharNishi
    @NazneenNaharNishi 9 місяців тому

    Bro, plz make a android studio tutorial .😀😀😀😀😀

  • @nintendogamer5075
    @nintendogamer5075 6 місяців тому +1

    In Germany it's the same as in the US. You have to be 16 years old to have a driving license.

    • @andyl9920
      @andyl9920 6 місяців тому

      I think it is germany where you only need to be 12 or 14 to drink? Correct me if im wrong

    • @nintendogamer5075
      @nintendogamer5075 6 місяців тому +1

      @@andyl9920 Technically you can with 14, but there are some regulations. I think you have to be 18, to drink officially, but with the age of 16, there are less regulations than with the age of 14.

  • @Tambuburay888
    @Tambuburay888 9 місяців тому +1

    This being uploaded 26 seconds ago caught me off guard
    Also how are there 3 comments here and much older than the video itself 💀

    • @BroCodez
      @BroCodez  9 місяців тому +4

      The video was unlisted, I'm making them public one by one each day

    • @Tambuburay888
      @Tambuburay888 9 місяців тому

      @@BroCodez Oh I see, the algorithm recommends your channel and I'm glad
      It'll be very helpful for me

  • @richarddevries2022
    @richarddevries2022 8 місяців тому

    18 years

  • @SkySenseiMC
    @SkySenseiMC 3 місяці тому +1

    4:16

  • @hlahtunthein2830
    @hlahtunthein2830 19 годин тому

    over 18 , sir

  • @raphaelsousa2046
    @raphaelsousa2046 20 днів тому

    watching from Brazil, here we have to be 18+ to get a driver's license

  • @user-qs9gh5ut1x
    @user-qs9gh5ut1x Місяць тому

    18+ years 🇿🇦

  • @user-xx3bf4ww6x
    @user-xx3bf4ww6x Місяць тому

    the work is a piece of cake but he 18+ content seems kinda sus

  • @gmkreddy4075
    @gmkreddy4075 3 місяці тому +1

    IN india u need to have 18 + to get licence for mooped you need to have 16

  • @harshjaiswal1634
    @harshjaiswal1634 7 місяців тому +2

    18+ for DL

  • @user-bp4yx3rz6e
    @user-bp4yx3rz6e 7 місяців тому +1

    I must be 18 years old to have a driving license in India

  • @tswaggcodes5
    @tswaggcodes5 3 місяці тому

    That’s was amazing. (I’m a novice)

  • @Cartoon_memes_f
    @Cartoon_memes_f 4 місяці тому

    Not working

  • @Piyushkumar_03
    @Piyushkumar_03 4 місяці тому

    We must be 18 years old to get a licence in India 🇮🇳

  • @tsben5600
    @tsben5600 5 місяців тому

    18 ethiopia

  • @Inspire_Transform
    @Inspire_Transform 2 місяці тому

    eh? AAYOOOOO

  • @armat_dt
    @armat_dt 6 місяців тому

    18 y.o. Kazakhstan

  • @EverydayEnglishOnline
    @EverydayEnglishOnline 3 місяці тому

    In India >=18

  • @niocoekaerts8437
    @niocoekaerts8437 3 місяці тому

    18

  • @godlessslayer69
    @godlessslayer69 4 місяці тому +1

    we need to be 11

  • @parthpatidar2764
    @parthpatidar2764 21 день тому

    what is the site for now? porn?

  • @rajpatel1279
    @rajpatel1279 24 дні тому

    I must be 18 years old to have a driving license in India