Вы находитесь на странице: 1из 2

INTERNAL ASSESSMENT – JAVASCRIPT

(Each Question carries equal marks (1*30=30 marks))

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)

D. var salaries = new Array() values = 39438, 39839 83729

22. What is the alternate name for Java script?


A. LimeScript B. Both a and d C.ECMScript D. ECMAScript
23. Java script can be used for Storing the form’s content to a database file on the server.
A. False B. True
24. Which of the following best describes JavaScript?
A. a low-level programming language. B. a scripting language precompiled in the browser.
C. a compiled scripting language. D. an object-oriented scripting language.
25. Which of the following is not considered a JavaScript operator?
A. new B. this C. delete D. typeof
26. JavaScript is interpreted by _________
A. Client B. Server C. Object D. None of the above
27. <script type="text/javascript">
x=4+"4";
document.write(x);
</script>
Output------?
A. 44 B. 8 C. 4 D. Error output
28. Is it possible to nest functions in JavaScript?
A. True B. False
29. What is mean by "this" keyword in javascript?
A. It refers current object B. It referes previous object
C. It is variable which contains value D. None of the above
30. Using _______ statement is how you test for a specific condition.
A. Select B. If C. Switch D. For

******************************************************************************

Вам также может понравиться