The document contains a series of multiple-choice questions related to JavaScript programming concepts. Topics covered include event handling, functions, loops, data types, and the Document Object Model (DOM). Each question presents four options, with one correct answer for each.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
13 views
Question Paper (JS)
The document contains a series of multiple-choice questions related to JavaScript programming concepts. Topics covered include event handling, functions, loops, data types, and the Document Object Model (DOM). Each question presents four options, with one correct answer for each.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
1. Which of the following events can be used to execute JavaScript code?
a) Mouse clicks b) Mouse overs c) Key press d) All of the above.
2. Which of the following statements will stop a function from running: a) stop b) return c) terminate d) None of the above. 3. Which of the following can be used to execute tasks contained within blocks of code, when called upon: a) Code Blocks b) Functions c) Arrays d) Variables 4. Which of the following statements can be used to exit a loop or skip an iteration of a loop: a) break, continue b) stop, continue c) pause, forward d) None of the above. 5. Which of the following methods can be used to loop through the values of an object: a) For Loop b) For in Loop c) While Loop d) Do While Loop 6. Which of the following functions can be used to determine if an expression is true: a) concat b) value c) boolean d) testval 7. Which of the following statements can be execute a block of code, if certain conditions are met: a) if b) else c) else if d) All of the above. 8. Which of the following method can be used to joins two or more strings? a) merge b) connects c) concat d) join 9. Which of the following functions can be used to add multiple values to an array in specific positions: a) Push b) Insert c) Splice d) Add 10. Which of the following functions can be used to insert a value into an array: a) Push b) Pop c) Force d) Add 11. Which of the following functions can be used to remove the last element of an array from output: a) Push b) Pop c) remove d) delete 12. Which of the following can be used to refer to a specific value in an array: a) Array Code b) Array Position c) Index Number d) None of the above. 13. Which of the following functions can be used to round a decimal value? a) round.value b) math.round c) round.val d) val.round 14. Which of the following functions can be used to identify the lowest value in a set of numbers: a) min.value b) math.min c) val.min d) None of the above. 15. Which of the following functions can be used to generate a random number: a) math.random b) random.int c) ran-integer d) None of the above. 16. Which of the following statements can be used to return the length of a string: a) txt.value b) txt.length c) txt.size d) txt.char 17. The value “John Smith” stored inside a variable, is known as a: a) Object b) String c) Array d) None of the above. 18. A data type that can store multiple properties and value is known as a: a) Array b) String c) Object d) Boolean 19. A variable that can store multiple values is known as a: a) Array b) String c) Constant d) Boolean 20. In JavaScript the equals sign is known as a: a) Assignment Object b) Assignment Operator c) Attachment Operator d) None of the above. 21. Which of the following methods can be used to output data in an html element? a) innerHTML b) outputHTML c) data.HTML d) data.Value 22. Which of the following methods can be used to output data in an alert message box: a) message.alert b) window.alert c) text.alert d) None of the above. 23. Which of the following methods is commonly used to output text using JavaScript? a) document.write b) document.output c) output.text d) None of the above. 24. Which of the following statements is correct: a) JavaScript cannot be forced onto a user web browser b) JavaScript must be supported on the users web browser in order to work. c) Most browsers do not support JavaScript by default d) Both a) and b) are true. 25. Which of the following functions can be done with JavaScript: a) Form Validation b) Alert Message c) Mouse Over Effects d) All of the above. 26. Which of the following statement is correct: a) JavaScript communicates a set of instructions to the web server b) JavaScript communicates a set of instructions to the web browser. c) None of the above. d) All of the above. 27. Which of the following identification methods can be used to specify which element should be updated on an specified event: a) Tag Name b) By ID c) By Class Name d) All of the above. 28. Which of the following events can trigger DOM Manipulation? a) A button is clicked b) A page is loaded c) Mouse Movement d) All of the above. 29. Which of the following statements best describes the Document Object Model: a) A method of inserting objects such as image and video content on an html page. b) A tree of objects created by your web browser, when a web page loads. c) A model used to increased the security of a web page. d) None of the above. 30. Inside which HTML element do we put the JavaScript? a) <js> b) <scripting> c) <script> d) <javascript>
Grab the full PDF version of Test Bank for JavaScript The Web Warrior Series 6th Edition Vodnik Gosselin 1305078446 9781305078444 with a fast download.