Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

thangeram Group Title

hi friends pls help me in JavaScript problem- var i = 0; do { print("This is iteration " + (i + 1) + "."); i++; } while( ); You can make sure a while loop runs once even if the condition never evaluates to true with a do/while loop. This ensures the code block runs at least once regardless of the condition's validity. Fix this do/while so it runs 4 times.

  • 3 years ago
  • 3 years ago

  • This Question is Closed
  1. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    while(i < 4)

    • 3 years ago
  2. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    so the code should look like this: var i = 0; do { print("This is iteration " + (i + 1) + "."); i++; } while (i < 4);

    • 3 years ago
  3. thangeram Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thanx friend its working

    • 3 years ago
  4. DoodleTech Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    <script type="text/javascript"> var i=0; do { document.write("This is iteration " + i + "."); document.write("<br />"); i++; } while (i<4); </script>

    • 3 years ago
  5. thangeram Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thanx doodletech

    • 3 years ago
  6. KorcanKanoglu Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    i < 4

    • 3 years ago
  7. KorcanKanoglu Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    well many beginner does the same mistake, they write i>4, take care and don2t do that simple mistake :D if loops are not same with while loops :D (as condition)

    • 3 years ago
  8. Eminemhongsheng Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    You study JavaScript on the Codecademy .com too:)

    • 2 years ago
  9. Eminemhongsheng Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Actually i don not understand that clause really means TT

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.