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)
<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>
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 responses to “JavaScript Tutorial for Beginners – 13 – Function and if statement”
you could just say greater than or equal to 350 XD
this song reminds me of my school days now i'm doing my internship :=(
thnks a looottt man
Don't know why you used an inverted quotation mark for 'and' when you can use && instead
sir you are a genious
Sir you are great.
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)
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);
yep this is one of those videos you replay 30 times lol
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>
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{
@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 ();