Академический Документы
Профессиональный Документы
Культура Документы
1. -----------is the JavaScript data type to handle the results of logical comparisons.
(a) Number (b) String (c) Boolean (d) null
2. A compiler converts source code to-------------------------------------------------------------code. (a)
Executable machine code (b) source code (c) mnemonic code (d) key code
3. JavaScript runs was developed by....................-.......?
(a) Netscape Communications (b) Microsoft corporation (c) Sun Microsystems (d) Oracle
4. Special characters are otherwise called------------------.
(a) Escape sequences (b) invalid characters (c) wrong characters (d) constants
5. Identify the wrong variable declaration from the following:
(a) var x2=10; (b) var x=2; (c) var 1x = 3; (d) var name=”Krish”
6. ---------operator in JavaScript decrements the given variable x BEFORE evaluating the expression.
(a) x + + (b) + + x (c) x − − (d) − − x
7. In JavaScript, ----------statement helps to skip the remaining statements of the loop for next
cycle of execution.
(a) break (b) initialization (c) increment/ decrement (d) continue
8. Any variable declared outside a function has validity within the …………………
(a) block only (b) function only (c) global scope (d) constant
9. The domain created by a programmer for placing all items related to a specific object/solution
in JavaScript is called …………………………
(a) object (b) namespace (c) class (d) property
10. A text file used to save name, value pairs related to website visited by a browser is called……. .
(a) memory (b) history (c) cookie (d) script
11. What does the following statement do? var x = document. Cookie;
(a) gets all cookies in a variable named x (b) prompts for input and stores the input value in x
(c) alerts regarding an error (d) sets the background color of the document
12. --------------------- String method in JavaScript converts a string into array?
(a) slice (b) split (c) substr (d) instr
13. The variable placed inside a class definition to store values related to an object (such as color,
size, location, etc.) is called.................. (a) object (b) namespace (c) class (d)
property
14. -------------------- Operator returns true when both operands are equal by value and type in
JavaScript?
(a)== (b) <> (c) = (d) ===
15. Java script is a case --------------------- language?
(a) sensitive (b) Insensitive (c) both a&b (d) None of these
16. Where we can write a JavaScript code?
(a) head (b) body (c) both a & b (d) None of these
17. ---------------------------- Function in JavaScript returns absolute value?
(a) math.obs (b) math.abs (c) math.ceil (d) math.floor
18. When a user views a page containing a JavaScript program, which machine actually executes the
script?
A. the User's machine running a Web browser B. The Web server
C. A central machine deep within Netscape's corporate offices D. None of the above
19. What is the correct syntax for referring to an external script called " abc.js"?
A. <script href=" abc.js"> B. <script name=" abc.js"> C. <script src=" abc.js"> D. None of these
20. The _______ method of an Array object adds and/or removes elements from an array.
A. Reverse B. Shift C. Slice D. Splice
21. Which of the following is the correct way for writing Java Script array?
A. var salaries = new Array(1:39438, 2:39839 3:83729)
B. var salaries = new (Array1=39438, Array 2=39839 Array 3=83729)
C. var salaries = new Array(39438, 39839,83729)
******************************************************************************