[go: up one dir, main page]

0% found this document useful (0 votes)
11 views5 pages

WEB_JS_MCQ

The document consists of a series of multiple-choice questions related to JavaScript programming concepts. Topics covered include variable declaration, data types, methods for displaying data, and properties of strings. The questions also address the execution environment for JavaScript code and the concept of objects and classes.

Uploaded by

Sowmya Santosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

WEB_JS_MCQ

The document consists of a series of multiple-choice questions related to JavaScript programming concepts. Topics covered include variable declaration, data types, methods for displaying data, and properties of strings. The questions also address the execution environment for JavaScript code and the concept of objects and classes.

Uploaded by

Sowmya Santosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Javascript is an ______ language

a.Object-oriented

b.Object-based

c.Procedural

d.None

2.Which of the following keywords is words to define a variable in javascript

a.var

b.let

c.Both a and b

d.None

3.Upon encountering empty statements,what does the javascrpit enterpretor do?

a.Throws an error

b.ignores the statement

c.Give a warning

d.None

4.which of the following methods can be used to display data in some form using javascript

a.document write()

b.console log()

c.window alert()

d.all above

5.which of the following method is used to access HTML elements using javascript

a.getElementbyid()

b.getElementbyclassName()

c.both a and b

d.None
6.How can a datatype be declared to be a constant type?

a.const

b.var

c.let

d.constant

7.What will be the output of the following code snippet?

<script type="text/javascript">

a=5+"9";

documnet.write(a);

</script>

a.compilation error

b.14

c.runtime error

d.59

8.What keyword is used to check wheather a given property is valid or not?

a.in

b.is in

c.exits

d.lies

9.When an operator value is null,the type of returned by the unary operator is:

a.Boolean

b.Undefined

c.Object

d.integers

10.What will be the output:


var a=true+true+true*3;

print(a)

a.3

b.0

c.error

d.5

11.Which tool is used to run the script code on client side

a. web browser

b. web page

c. web site

d. none of these

12.Which tool is used to run the script code on server side

a. web browser

b. web server (like-IIS,PWS etc)

c. web site

d. web page

13.Which of the following represents both the data and function that operate on data are bundled as a
unit

a. object

b. class

c. methods

d. parent class

14.which of the following is a template or blueprint of a set of objects

a. objects

b. methods

c. class

d. constructor

15.how many tokens are there in javascript


a.6 b.5

c.4 d.3

16.how many types of operators are available in javascript

a.8

b.6

c.7

d.9

17.which of the following are properties of strings in javascript

a. length , constructor, prototype

b. style ,length, new

c. concat, style, constructor

d. none of these

18.____________provides you properties and methods for mathematical constants and function

a. Math Object

b. String object

c. Math method

d. math function

19.which of the following is correct syntax for Date in Javascript

a. Date()

b. Date(milliseconds)

c. Date(dateString)

d.Date(year,month,date[,hour,minute,second,millisecond])

e. all of the above

20. how many types of errors are there in Javascript

a.1 b.2

c.3 d.4

You might also like