• Monday , 30 March 2020

JavaScript Tutorial for Beginners – 13 – Function and if statement

Code Canyon



Function and an if statement.

Original source

3d Ocean

Related Posts

12 Comments

  1. Logan Payne
    July 20, 2019 at 02:25

    you could just say greater than or equal to 350 XD

  2. arjun varma
    July 20, 2019 at 02:25

    this song reminds me of my school days now i'm doing my internship :=(

  3. nazim 4games
    July 20, 2019 at 02:25

    thnks a looottt man

  4. goat Trigger
    July 20, 2019 at 02:25

    Don't know why you used an inverted quotation mark for 'and' when you can use && instead

  5. anwar hossen
    July 20, 2019 at 02:25

    sir you are a genious

  6. Mohammad Jaker Khan
    July 20, 2019 at 02:25

    Sir you are great.

  7. Damian Clarke
    July 20, 2019 at 02:25

    i dont understand when we use the semicolon. For example why is it used here
    –>document.write(player + " Struck out"); but not here–> function batting(player, distance)

  8. Segun Anifowoshe
    July 20, 2019 at 02:25

    Thanks EJ …Repeated several times until FcMadrid pays millions fine …VR

    function gameWinner(team, goal){
    if (goal > 3 && goal >0){
    alert ("Congrats!");
    document.write (team + " wins the Championship");
    }
    else if (goal <=3 && goal >=0){
    alert ("Badluck!");
    document.write(team + " will be banned ever");
    }
    else{
    alert ("Great Loss!");
    document.write(team + " will pay millions");
    }
    }
    gameWinner ("FcMadrid", 0);

  9. Ali Mansour
    July 20, 2019 at 02:25

    yep this is one of those videos you replay 30 times lol

  10. Rafy-Ivan Morales
    July 20, 2019 at 02:25

    Any One Can Help me:….Wrap with a div

    As before, let's group all three pieces of supporting content with divs, like this:

    <div class="learn-more">
    <div class="container">
    <div>
    <h3>Travel</h3>

    </div>

    <div>
    <h3>Host</h3>

    </div>

    <div>
    <h3>Trust and Safety</h3>

    </div>
    </div>
    </div>

    How I will

    Wrap all pieces of supporting content with two divs, like in the example above. Give the outer div a class="learn-more" and the inner div a class="container".
    in this code:
    <!DOCTYPE html>
    <html>
    <body>
    <div class="nav">
    <div class="container">
    <div>
    <h3>Travel</h3>
    <p>"From apartments and rooms to treehouse."
    <p>
    <a href="#">"See how to travel on Airbni."
    </p>
    </div>

    <div>
    <h3>Host</h3>
    <p>"Renting out your unused space could pay your bills or fund your next vacation."</P>
    <p><a href="#">"Learn more about hosting"
    </div>
    <div>
    <h3>Trust and Safety</h3>
    <p> "From Verified ID to our worldwide customer support team, we've got your back."</p>
    <p><a href="#">"Learn about trust at Airbnb"
    </P>

    <h1>"Find a place to stay."</h1>
    <P>"Rent from people in over 34,000clients and 192 countries."
    </div>
    </div>
    </body>
    </html>

  11. David Garcia
    July 20, 2019 at 02:25

    is it possible to replace the else if for just a bunch of if statements? If so is there something sacrificed by doing so?
    if()
    if()
    if()
    instead of
    if()
    else if()
    else{

  12. MrRedhawk16
    July 20, 2019 at 02:25

    @EJ Media Finally i made it to this video ,Thank you I enjoyed this whole class looking forward for 14,15,16 etc  

    function Great () {
    alert ("Great  EJ Media") ;
    }
    Great (); 

Leave A Comment

You must be logged in to post a comment.