JavaScript Questions and Answers
JavaScript What is JavaScript? - Answer-A computer language used predominantly by browsers What tools do you need to create web applications in JavaScript? - Answer-A text editor, A Browser Where do you put the JavaScript so that it will execute properly in your documents? - Answer-Linked as an external file with a .js extension. , at the end of the body section of the HTML document, In the head section of the HTML document, In a "script block" within the HTML The alert() function is a method to give user feedback. What does the command do when executed? - Answer-Pops up a dialog box in the browser with text information and an "OK" button. How would you format a comment in JavaScript to leave author notes or assist in troubleshooting your code? - Answer-/* commented text*/ , // commented text data types recognized in JavaScript - Answer-Text, Numbers, Booleans What is a variable? - Answer-Temporary data storage that can be altered, or varied. A variable declaration is the creation of a new storage area in memory. It is achieved using the var keyword and - Answer-a name. Once declared, a variable gets its type and value through the process of - Answer-declaration. What is an array? - Answer-A variable that can hold more than one value. Which of the following is NOT a comparison operator? = = == != - Answer-= Operators have an order of precedence. Arithmetic operators have a higher priority than comparison operators. - Answer-True Assignment operators can store the result of a comparison operation. - Answer-True Comparisons can be made to control program flow with what type of JavaScript statement(s)? - Answer-Conditionals The result of the following code block will be: var roomTemprature = 30; if (roomTemperature 30) { roomTemperat
Información del documento
- Subido en
- 23 de mayo de 2024
- Número de páginas
- 3
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas