0% found this document useful (0 votes)
7 views7 pages

Example 2

Uploaded by

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

Example 2

Uploaded by

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

1. Which of the following is a built – function ?

a. Float
b. Length
c. String
d. Cast
e. None of the above
2. Which type of JavaScript language is ___
a. Object-Orientedb.
b. Object-Based
c. Assembly-language
d. High-level

3. Which of the following is the correct output for the following JavaScript
code:

a. 1
b. Error
c. 10
d. 5

4. Which one of the following also known as Conditional Expression:

a. Alternative to if-else
b. Switch statement
c. If-then-else statement
d. immediate if

5. Among the following given JavaScript snipped codes, which is more


efficient:

Code A

for(var number=10;number>=1;number--)
{
document.writeln(number);
}
Code B

var number=10;
while(number>=1)
{
document.writeln(number);
number++;
}
a. Code 1
b. Code 2
c. Both Code 1 and Code 2
d. Cannot Compare

6. The "function" and " var" are known as:

a. Keywords
b. Data types
c. Declaration statements
d. Prototypes

7. In the following given syntax of the switch statement, the Expression is


compared with the labels using which one of the following operators?

a. ===
b. Equals
c. ==
d. equals

8. What will happen, if the following JavaScript code is executed?


a. An error is displayed
b. An exception is thrown
c. The values of count variable are logged or stored in a particular
location or storage
d. The value of count from 0 to 9 is displayed in the console

9. Which of the following is the correct output for the following JavaScript
code:

a. 9
b. 0
c. 8
d. Undefined

10.Which of the following is the correct output for the following JavaScript
code:
a. 3
b. 0
c. Error
d. 2

11.Which of the following is the correct output for the following JavaScript
code:

a. 10
b. 17
c. 18
d. 0

12.Which of the following option is used as hexadecimal literal beginning?

a. 00
b. 0x
c. 0X
d. Both 0x and 0X

13.Which of the following number object function returns the value of the
number?
a. toString()
b. valueOf()
c. toLocaleString()
d. toPrecision()
14.See the given code of JavaScript and choose the correct output from the
following:
a. compilation error
b. false
c. runtime error
d. true

15.What will be the output of the following JavaScript code?


a. True
b. false
c. runtime error
d. compilation error

16.Find out the correct output of the following given piece of code from the
given options:

a. logical error
b. false
c. runtime error
d. true

17.See the given code of JavaScript and choose the correct output from the
following:

a. 4090
b. 90
c. 4050
d. Exception

18.Consider the following snippet of JavaScript code:


Which one of the following statement is most suitable to check if the pattern
matches with the sting "text".

a. test(text)
b. equals(pattern)
c. test(pattern)
d. text==pattern

19.Which of the following is the correct output for the following JavaScript
code:

a. False
b. True
c. Runtime error
d. Compilation error

20 . Which one of the following is correct output for the following given
JavaScript code:

a. 123.56
b. Taller
c. 190
d. Little shorter

You might also like