A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

1. For displaying data in JavaScript, we can’t use ____________
a. document.write()
b. console.log()
c. innerHTML
d. document.getElementById()
View Answer Report Discuss Too Difficult!
Answer: (d).document.getElementById()

2. For testing we should use ________
a. document.write()
b. console.log()
c. window.alert()
d. innerHTML
View Answer Report Discuss Too Difficult!
Answer: (a).document.write()

3. Which of the following keyword stops the execution of JavaScript?
a. break
b. return
c. debugger
d. try….catch
View Answer Report Discuss Too Difficult!
Answer: (c).debugger

4. Arrays in JavaScript are written within ____________
a. {}
b. []
c. “”
d. ()
View Answer Report Discuss Too Difficult!
Answer: (b).[]

5. typeof “null” in JavaScript is _______
a. number
b. string
c. object
d. undefined
View Answer Report Discuss Too Difficult!
Answer: (c).object

6. Negative positions for string do not work in ______________
a. Internet Explorer 8
b. Chrome
c. Safari
d. Opera
View Answer Report Discuss Too Difficult!
Answer: (a).Internet Explorer 8

7. For converting string to array we can use ______________ method.
a. charAt()
b. charCodeAt()
c. split()
d. toLowerCase()
View Answer Report Discuss Too Difficult!
Answer: (c).split()

8. JavaScript numbers are stored as ______________.
a. integers
b. double precision floating point
c. double
d. floating point
View Answer Report Discuss Too Difficult!
Answer: (b).double precision floating point

9. The integers in JavaScript are precise up to ___________.
a. 12 digits
b. 10 digits
c. 23 digits
d. 15 digits
View Answer Report Discuss Too Difficult!
Answer: (d).15 digits

10. Typeof “infinity” will return ___________
a. string
b. number
c. object
d. undefined
View Answer Report Discuss Too Difficult!
Answer: (b).number

Page 1 of 6