Important Java Script MCQ

Q.-1: Java Script is

A) client site and server site
B) only client site
C) only server site
D) None of the above

Q.-2: What is work of documentwrite ?

A) to alert a message
B) to show the HTML tag
C) to print the variable value
D) All of the above

Q.-3: How to declare variable in java script ?

A) use this keyword
B) use static keyword
C) use extern variable
D) use var keyword

Q.-4: When we use documentgetElementById ?

A) when we use any variable value
B) when we work with HTML tag
C) when we work with script tag
D) all of the above

Q.-5: Which is the proper event handling function?

A) OnClick
B) OnClk
C) Click
D) All Above

Q.-6: How to identify a HTML tag in java script?

A) by a tag name
B) by their id
C) by their function
D) All of the above

Q.-7: What is the method to generate a pop up message ?

A) use documentwrite and function
B) use only alert
C) use function and documentwrite
D) use to InnerHTML

Q.-8: JavaScript is designed for following purpose

A) To Perform Server Side Scripting Opertion
B) To Style HTML Pages
C) To Execute Query Related to DB on Server
D) To add interactivity to HTML Pages

Q.-9: JavaScript is an ________ language

A) compiled
B) interpreted

Q.-10: ______ tag is an extension to HTML that can enclose any number of JavaScript statements

A) Microsoft
B) Navigator
C) Live Script
D) Native

Q.-11: ______ JavaScript is also called

A) Live Script
B) Java
C) Script
D) All Above

Q.-12: What is the correct JavaScript syntax to write "Hello World"?

A) Systemoutprintln("Hello World"),
B) println ("Hello World"),
C) documentwrite("Hello World"),
D) responsewrite("Hello World"),

Q.-13: Using _______ statement is how you test for a specific condition

A) Select
B) If
C) For
D) While

Q.-14: Javascript is a _________________computer programming language

A) Static
B) Dynamic

Q.-15: JavaScript was first known as LiveScript, but _______________changed its name to JavaScript

A) Microsoft
B) Netscape
C) Sun Java
D) Apache

Q.-16: Why so JavaScript and Java have similar name?

A) JavaScript is a stripped-down version of Java
B) JavaScript syntax is loosely based on Java
C) They both originated on the island of Java
D) None of the above

Q.-17: Inside which HTML element do we put the JavaScript?

A) js
B) scripting
C) script
D) javascript

Q.-18: ______method evaluates a string of JavaScript code in the context of the specified object

A) Eval
B) ParseFloat
C) ParseInt
D) Efloat

Q.-19: Is it possible to nest functions in JavaScript?


Q.-20: Which of the following function of String object returns the Decimal value ?

A) ParseInt()
B) toString()
C) ParseFloat()
D) All above These

Q.-21: What are variables used for in JavaScript Programs?

A) Storing numbers, dates, or other values
B) Varying randomly
C) Causing high-school algebra flashbacks
D) None of the above

Q.-22: 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

Q.-23: Choose the client-side JavaScript object?

A) Database
B) Cursor
C) Client
D) FileUpLoad

Q.-24: The syntax of a blur method in a button object is ______________

A) Blur()
B) Blur(contrast)
C) Blur(value)
D) Blur(depth)

Q.-25: Scripting language are

A) High Level Programming language
B) Assembly Level programming language
C) Machine level programming language
D) All

Q.-26: In JavaScript, Window.confirm() method return true or false value ?


Q.-27: There are three types of loops in javascript.

A) Yes
B) No

Q.-28: Looping refers to perform a set of operations repeatedly


Q.-29: The .......... object is a pre defined javascript object

A) Function
B) Switch
C) Case
D) Loop

Q.-30: .............. are those which can be accessed from any part of the program

A) Constant
B) Local
C) Global
D) Native

Contact Fee Courses in Rishieksh