I need help answering these JavaScript Questions.?

How many times will this for-loop run? Assume x is a number/integer. for( x = ; x < ; x++ ) { }

times

times

times

times

times

How many times will this for-loop run? Assume x is a number/integer. for( x = ; x <= ; x++ ) { }

times

times

times

times

times

How many times will this for-loop run? Assume x is a number/integer. for( x = ; x < ; x += ) { }

times

times

times

times

times

How many times will this for-loop run? Assume x is a number/integer. for( x = ; x >= ; x -= ) { }

times

times

times

times

times

✅ Answers

  • For each question, just memorise the number, x.

    Then, count up (or down) from that number in the required intervals, until the condition is “false”.

    So for the first one, you would go:

    Ok, let’s remember .

    How much is it going up by? Oh, , that’s easy enough!

    Right, let’s get a tally going.

    , , , , , , , , , , …

    Oh, right! <, but isn’t <; it’s equal. Righty-oh then, that went from to . That’s numbers, so the answer’s (B).

    Hope this helps, I wasn’t going to just give you the answers.

    Just remember to always check how high it’s going, whether it can be equal to the number cap, and how much it’s going up by!

    Hnefatl

  • Easiest way is to actually run the code.

    . times

    . times

    . times

    . times

    You could also follow through the code yourself and count how many times.

  • When you set “i < aNumber” it stops the number before that number so “i < ” would loop times. and on the last one you have a – there by the = sign. you also set a value for x twice there. So a lot of your code is messed up. And if you say that i messed something up that is basic html and i scored better than most people at JavaScript. I have over a . score for JavaScript.

    See also  How to save file to a session variable in PHP uploading form?

    Source(s): IU code HTML, JavaScript, And more

  • Other Related Questions

    Learning Visual Basic ?

    Answers Favorite AnswerTry using "System.Diagnostics.Process. GetProcessesByName( "iwmp" ).Length > " for your check.

    Microsoft Office word Fast answer needed its urgent?

    Answers Favorite AnswerTry this:http://www.techsupport.com///microsoft-wo...Here is another thread re: the same issue with instructions:http://www.pcreview.co.uk/forums/modification-not-...http://www.techsupport.com///microsoft-wo...http://support.microsoft.com/kb/http://answers.microsoft.com/en-us/office/forum/of...

    Can I download a whole city android google maps?

    Answers Favorite Answer:) Yes!!!Interesting question. I wonder why it has blocked in this way especially considering that Google Earth is very detailed and has good maps of Israel.

    What is meant by ROM ? Explain in simple but elaborate terms.What about mobile ROM’s?

    Answers Favorite AnswerHi Diva below is a link that will give a simple answer.http://wiki.answers.com/Q/What_does_ROM_stand_for_...Hope this helps.Source(s): Experience and wiki answers.ROM is Read only memory. i.e data can write only once.There two types of ROM..ROM.PROMThe difference between ROM and PROM.that is ROM is programmed during manufacturing it means data stored by manufacturing company.PROM is blank memory that a user programmable memory.user can store content on PROM.both ROM and PROM are Read only memory Data can write only once.and its not possible to write so many time.Memories of PROM and ROM are Non-volatile in nature. Its that stored informations can retain even power goes off.

    Leave a Comment