JavaScript FUNCTIONS are easy! 📞

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • 00:00:00 introduction
    00:00:14 functions
    00:01:57 arguments/parameters
    00:04:40 return
    00:06:35 example 1
    00:07:33 example 2
    00:09:30 example 3
    00:11:45 conclusion
    // function = A section of reusable code.
    // Declare code once, use it whenever you want.
    // Call the function to execute that code.
    function happyBirthday(username, age){
    console.log(`Happy birthday to you!`);
    console.log(`Happy birthday to you!`);
    console.log(`Happy birthday dear, ${username}`);
    console.log(`Happy birthday to you!`);
    console.log(`You are ${age} years old!`);
    }
    function add(x, y){
    return x + y;
    }
    function subtract(x, y){
    return x - y;
    }
    function multiply(x, y){
    return x * y;
    }
    function divide(x, y){
    return x / y;
    }
    function isEven(number){
    return number % 2 === 0 ? true : false;
    }
    function isValidEmail(email){
    return email.includes("@") ? true : false;
    }
    console.log(happyBirthday("BroCode", 25));
    console.log(isValidEmail("Bro@fake.com"));

Комментарии • 38

  • @BroCodez
    @BroCodez  10 месяцев назад +16

    // function = A section of reusable code.
    // Declare code once, use it whenever you want.
    // Call the function to execute that code.
    function happyBirthday(username, age){
    console.log(`Happy birthday to you!`);
    console.log(`Happy birthday to you!`);
    console.log(`Happy birthday dear, ${username}`);
    console.log(`Happy birthday to you!`);
    console.log(`You are ${age} years old!`);
    }
    function add(x, y){
    return x + y;
    }
    function subtract(x, y){
    return x - y;
    }
    function multiply(x, y){
    return x * y;
    }
    function divide(x, y){
    return x / y;
    }
    function isEven(number){
    return number % 2 === 0 ? true : false;
    }
    function isValidEmail(email){
    return email.includes("@") ? true : false;
    }
    console.log(happyBirthday("BroCode", 25));
    console.log(isValidEmail("Bro@fake.com"));

    • @sertying
      @sertying 9 месяцев назад

      Hello Bro Code! May I have a favor? can you make a tutorial on how to make pages in react js (jsx). Please? :(

    • @percussion1999
      @percussion1999 Месяц назад

  • @nathanielfox1143
    @nathanielfox1143 5 месяцев назад +32

    After watching multiple JS videos on functions, this is the video that finally gave me that "Aha!" moment. Now I understand. Thank you!

    • @GrayShark09
      @GrayShark09 3 месяца назад

      He is such an amazing teacher!

  • @isaacfavour3696
    @isaacfavour3696 3 месяца назад +1

    this was so helpful Brocode ! the best I've seen on this particular topic so far

  • @nailevsky
    @nailevsky 6 месяцев назад +2

    That's one of the, actually it's the best video about how functions work!

  • @juanarango4436
    @juanarango4436 2 месяца назад +4

    THANK YOU THANK YOU. SO MANY VIDEOS ON THIS TOPIC. AND I FINALLY GOT IT WATCHING THIS ONE.!!!!!

  • @gichuhisamuel4387
    @gichuhisamuel4387 8 месяцев назад +6

    Thanks bro much appreciated you are life saviour

  • @Toxic-xk2zz
    @Toxic-xk2zz 5 месяцев назад

    Love the way you explained ❤

  • @mohammedshafiulla9115
    @mohammedshafiulla9115 4 месяца назад +1

    Really bro, the way of your explanation is not in this particular video but in all this playlist is amazing, I like the way you explain everything with the examples.👌

    • @AvidAfrican
      @AvidAfrican 4 месяца назад

      Listened to bunch of videos in yt i didn't get it until i saw Bro code i got a better understanding...

  • @user-xe9lq8bi7d
    @user-xe9lq8bi7d 5 месяцев назад +1

    perfectly explained !!!!! thank youuuuuuu

  • @nandinisingh8952
    @nandinisingh8952 3 месяца назад

    outstanding and easy to understand...thankyou :)

  • @NickTorius
    @NickTorius 17 дней назад

    The craziest thing is that im watching this tutorial today an it actually is spongebobs birthday today, july 14

  • @mostlenyora316
    @mostlenyora316 6 месяцев назад +1

    Thanks King 🤟

  • @finanin3263
    @finanin3263 3 дня назад

    Thank you for making these topics more understandable. I have been using codecademy and some of it dosn't even sound like it's written in English. Clear ideas, good examples, easy learning. thanks again :)

  • @ronykax
    @ronykax 9 месяцев назад +6

    dude ur a legend

  • @greengraphics5060
    @greengraphics5060 6 месяцев назад +3

    You made me understand Javascript. Pls can you do node Js videos

  • @markojelicic5228
    @markojelicic5228 6 месяцев назад

    best explanation, tnx :)

  • @Mostafa-jh2ij
    @Mostafa-jh2ij 3 месяца назад

    Thanks Bro!

  • @joachimuche424
    @joachimuche424 6 месяцев назад +1

    Thx

  • @Azmeroth1370
    @Azmeroth1370 6 месяцев назад +1

    this man sound like another great man, Josh from Let’sgameitout

  • @selviraja775
    @selviraja775 9 месяцев назад +2

    Love from, india you are a very good explanator sir.

    • @ronykax
      @ronykax 9 месяцев назад

      why do Indians call people sir

  • @hackingmaster392
    @hackingmaster392 9 месяцев назад

    love you from bangladesh ❤❤❤❤

  • @samueldayo9261
    @samueldayo9261 6 месяцев назад +1

    Thanks for this video, bro code

  • @dileepkumardm1609
    @dileepkumardm1609 9 месяцев назад

    Sir along with programming language what Knowledge is required to get placed.

  • @nikhiltiwari7371
    @nikhiltiwari7371 9 месяцев назад +1

    Bro I got sem end exams and have web dev subject can you please make a tutorial about MEAN stack pleease

  • @bicyclekikz14
    @bicyclekikz14 2 месяца назад

    when you switch to (age, username) as parameters but the argument stays the same, how does javascript know age suppose to belong to a number?? and when you call it, the order didn't change

  • @sertying
    @sertying 9 месяцев назад +3

    Hello Bro Code! May I have a favor? can you make a tutorial on how to make pages in react js (jsx). Please? :(

    • @buddhavlr1500
      @buddhavlr1500 9 месяцев назад +3

      he already did some tutorials on react like 2 weeks ago

  • @mohammed_mishal
    @mohammed_mishal 9 месяцев назад +4

    Hi BRO CODE : ) .

  • @STR-DP
    @STR-DP 6 месяцев назад +2

    SpongeBob turned 37 in 2023 and Patrick turned 38.

    • @l-fitness3590
      @l-fitness3590 6 месяцев назад +2

      I laughed more than I should have at that part 😂

  • @islam_095._
    @islam_095._ 9 месяцев назад

    Is there an algorithm that predicts aviator play?