Reference no: EM133482408
Question: Write a responses from the perspective of a JavaScript programmer in a medium-sized company. You may assume that the JavaScript programmer has some knowledge of other programming languages.
In your original post:
Draft a response to the questions below. Remember to use your textbook and other academic resources to justify your responses.
Not all loops are suited to all purposes. Some kinds of loops will always execute once, and some may not execute at all, depending on the conditions involved. Discuss the different types of loops, and how they might be used in different circumstances. Be very specific. Remember, an "if" statement is not a loop.
Continuing to discuss decision structures and program flow, you sometimes have a choice of an "if" statement or a "switch/case" statement. Many times, either can accomplish the goal of that section of code. Under what circumstances might you use either one in JavaScript, and are there times when it does not matter. Be specific here - code examples to demonstrate your points would be helpful.
Arrays are variables since they store data. As such, that data may be changed during the course of the program. Are there times when the use of an array, rather than a conventional variable, is preferable? Are there times when the use of an array is mandatory? Do you have choices, or is it one or the other? What are some limitations of arrays? Again, be specific.