JS Impotant Question

You might also like

You are on page 1of 10

MCQ

1. The development environment offers which standard construct for data validation
A) Super controlled loop constructs
B) Case sensitivity check
C) Validation constructs
D) All of the mentioned
Answer : D
______________________________________________________________________www.study2online.com

2. The script tag must be placed in


A) head
B) head and body
C) title and head
D) All of the mentioned
Answer : B
______________________________________________________________________www.study2online.com

3. A JavaScript program developed on a Unix Machine


A) will throw errors and exceptions
B) must be restricted to a Unix Machine only
C) will work perfectly well on a Windows Machine
D) will be displayed as a JavaScript text on the browser
Answer : C
______________________________________________________________________www.study2online.com

4. JavaScript is ideal to
A) make computations in HTML simpler
B) minimize storage requirements on the web server
C) increase the download time for the client
D) None of the mentioned
Answer : B
______________________________________________________________________www.study2online.com

5. JavaScript can be written


A) directly into JS file and included into HTML
B) directly on the server page
C) directly into HTML pages

Page 1/10 Visit our site: https://study2online.com/


MCQ

D) All of the mentioned


Answer : A
______________________________________________________________________www.study2online.com

6. Which of the following Attribute is used to include External JS code inside your HTML
Document
A) src
B) ext
C) script
D) link
Answer : A
______________________________________________________________________www.study2online.com

7. A proper scripting language is a


A) High level programming language
B) Assembly level programming language
C) Machine level programming language
D) Low level programming language
Answer : A
______________________________________________________________________www.study2online.com

8. Javascript is _________ language.


A) Programming
B) Application
C) None of These
D) Scripting
Answer : D
______________________________________________________________________www.study2online.com

9. JavaScript is ______ Side Scripting Language.


A) Server
B) ISP
C) None of These
D) Browser
Answer : D

Page 2/10 Visit our site: https://study2online.com/


MCQ

______________________________________________________________________www.study2online.com

10. JavaScript is designed for following purpose -


A) To Style HTML Pages
B) To add interactivity to HTML Pages.
C) To Perform Server Side Scripting Opertion
D) To Execute Query Related to DB on Server
Answer : B
______________________________________________________________________www.study2online.com

11. Cost for Using JavaScript in your HTML is _________ .


A) Its Free !!!
B) $10 / Year
C) $15 / Year
D) $5 / Year
Answer : A
______________________________________________________________________www.study2online.com

12. JavaScript Code is written inside file having extension __________.


A) .jvs
B) .javascript
C) .js
D) .jsc
Answer : C
______________________________________________________________________www.study2online.com

13. Why JavaScript is called as Lightweight Programming Language ?


A) because JS is available free of cost
B) because JS is client side scripting
C) because we can add programming functionality inside JS
D) because JS can provide programming functionality inside but up to certain extend.
Answer : D
______________________________________________________________________www.study2online.com

14. JavaScript is also called as _____________.


A) Server Side Scripting Language

Page 3/10 Visit our site: https://study2online.com/


MCQ

B) Browser Side Scripting Language


C) Client Side Scripting Language
D) Both B and C
Answer : D
______________________________________________________________________www.study2online.com

15. Local Browser used for validations on the Web Pages uses __________.
A) Java
B) HTML
C) CSS
D) JS
Answer : D
______________________________________________________________________www.study2online.com

16. JavaScript Code can be called by using


A) RMI
B) Triggering Event
C) Preprocessor
D) Function/Method
Answer : D
______________________________________________________________________www.study2online.com

17. Which of the following is not considered as an error in JavaScript?


A) Syntax error
B) Missing of semicolons
C) Division by zero
D) All of the mentioned
Answer : C
______________________________________________________________________www.study2online.com

18. The main purpose of a “Live Wire― in NetScape is to


A) Create linkage between client side and server side
B) Permit server side, JavaScript code, to connect to RDBMS
C) Support only non relational database
D) To interpret JavaScript code
Answer : B

Page 4/10 Visit our site: https://study2online.com/


MCQ

______________________________________________________________________www.study2online.com

19. Which attribute is used to specify that the script is executed when the page has finished
parsing ( only for external scripts )
A) parse
B) a sync
C) defer
D) type
Answer : C
______________________________________________________________________www.study2online.com

20. Which of the following Attribute is used to include External JS code inside your HTML
Document
A) src
B) ext
C) script
D) link
Answer : A
______________________________________________________________________www.study2online.com

21. The generalised syntax for a real number representation is


A) [digits][.digits][(E|e)[(+|-)]digits]
B) [digits][+digits][(E|e)[(+|-)]digits]
C) [digits][(E|e)[(+|-)]digits]
D) [.digits][digits][(E|e)[(+|-)]digits]
Answer : A
______________________________________________________________________www.study2online.com

22. Which of the following is not considered as an error in JavaScript?


A) Syntax error
B) Missing of semicolons
C) Division by zero
D) All of the mentioned
Answer : C
______________________________________________________________________www.study2online.com

Page 5/10 Visit our site: https://study2online.com/


MCQ

23. The escape sequence ‘f’ stands for


A) Floating numbers
B) Representation of functions that returns a value
C) f is not present in JavaScript
D) Form feed
Answer : D
______________________________________________________________________www.study2online.com

24. The snippet that has to be used to check if “a― is not equal to “null― is
A) if(a!=null)
B) if (!a)
C) if(a!null)
D) if(a!==null)
Answer : D
______________________________________________________________________www.study2online.com

25. The statement a===b refers to


A) Both a and b are equal in value, type and reference address
B) Both a and b are equal in value
C) Both a and b are equal in value and type
D) There is no such statement
Answer : C
______________________________________________________________________www.study2online.com

26. Assume that we have to convert “false― that is a non-string to string. The command
that we use is (without invoking the “new― operator)
A) false.toString()
B) String(false)
C) String newvariable=―false―
D) Both false.toString() and String(false)
Answer : D
______________________________________________________________________www.study2online.com

27. Consider the following snippet code<br/> <pre>var string1 = ―123―;<br/> var intvalue
= 123;<br/> alert( string1 + intvalue );</pre><br/> The result would be

Page 6/10 Visit our site: https://study2online.com/


MCQ

A) 123246
B) 246
C) 123123
D) Exception
Answer : C
______________________________________________________________________www.study2online.com

28. A function definition expression can be called


A) Function prototype
B) Function literal
C) Function definition
D) Function declaration
Answer : B
______________________________________________________________________www.study2online.com

29. The property of a primary expression is


A) stand-alone expressions
B) basic expressions containing all necessary functions
C) contains variable references alone
D) complex expressions
Answer : A
______________________________________________________________________www.study2online.com

30. The JavaScript’s syntax calling ( or executing ) a function or method is called


A) Primary expression
B) Functional expression
C) Invocation expression
D) Property Access Expression
Answer : C
______________________________________________________________________www.study2online.com

31. Which of the operator is used to test if a particular property exists or not?
A) in
B) exist
C) within
D) exists

Page 7/10 Visit our site: https://study2online.com/


MCQ

Answer : A
______________________________________________________________________www.study2online.com

32. The object has three object attributes namely


A) Class, parameters, object’s extensible flag
B) Prototype, class, objects’ parameters
C) Prototype, class, object’s extensible flag
D) Native object, Classes and Interfacces and Object’s extensible flag
Answer : C
______________________________________________________________________www.study2online.com

33. A linkage of series of prototype objects is called as


A) prototype stack
B) prototype chain
C) prototype class
D) prototypes
Answer : B
______________________________________________________________________www.study2online.com

34. To determine whether one object is the prototype of (or is part of the prototype chain of)
another object, one should use the
A) isPrototypeOf() method
B) equals() method
C) === operator
D) none of the mentioned
Answer : A
______________________________________________________________________www.study2online.com

35. The purpose of extensible attribute is to


A) make all of the own properties of that object nonconfigurable
B) to configure and bring a writable property
C) “lock down― objects into a known state and prevent outside tampering
D) all of the mentioned
Answer : C
______________________________________________________________________www.study2online.com

Page 8/10 Visit our site: https://study2online.com/


MCQ

36. The basic purpose of the toLocaleString() is to


A) return a localised object representation
B) return a parsed string
C) return a local time in the string format
D) return a localized string representation of the object
Answer : D
______________________________________________________________________www.study2online.com

37. JavaScript is designed for following purpose


A) To Style HTML Pages
B) To Execute Query Related to DB on Server
C) To add interactivity to HTML Pages.
D) To Perform Server Side Scripting Opertion
Answer : C
______________________________________________________________________www.study2online.com

38. JavaScript Code can be called by using _________.


A) RMI
B) Triggering Event
C) Preprocessor
D) Function / Method
Answer : D
______________________________________________________________________www.study2online.com

39. Which attribute is used to specifies that the script is executed when the page has finished
parsing (only for external scripts)
A) parse
B) async
C) defer
D) type
Answer : C
______________________________________________________________________www.study2online.com

40. Which was the first browser to support JavaScript ?


A) IE
B) Netscape

Page 9/10 Visit our site: https://study2online.com/


MCQ

C) Mozilla Firefox
D) Google Chrome
Answer : B
______________________________________________________________________www.study2online.com

41. JavaScript is invented by ________.


A) Helsinki, Linus
B) W3 Group
C) Brendan Eich
D) James Gosling
Answer : C
______________________________________________________________________www.study2online.com

42. JavaScript was invented at _______ Lab.


A) AT&T Bell LAb
B) Google Lab
C) Sun Microsystem
D) Netscape
Answer : D
______________________________________________________________________www.study2online.com

43. Variable can hold ________ value at a time.


A) Multiple
B) Single
C) None of these
D) Double
Answer : B
______________________________________________________________________www.study2online.com

Page 10/10 Visit our site: https://study2online.com/

You might also like