MCQ Bank
What value will be returned by the following expression? 1 === "1"
- A) False
- B) NaN
- C) True
- D) -Infinity
Which of the following is not a valid JavaScript variable?
- A) None of the given options
- B) number
- C) 2number
- D) mynumber2
What value will be returned by the following expression?
0 == true
- A) False
- B) Infinity
- C) NaN
- D) True
For bit wise operations, a numeric operand is converted into ____________ binary numbers.
- A) 32-bit
- B) 8-bit
- C) 64-bit
- D) 16-bit
What will be the sequence of elements in the array "colour" after using sort function on it?
var colour = ["Blue", "Pink", "Purple", "Black"];
colour.sort();
- A) ["Black", "Purple ", "Pink ", "Blue "];
- B) ["Purple", "Pink", "Blue ", "Black"];
- C) ["Blue", "Pink", "Purple", "Black"];
- D) ["Black", "Blue ", "Pink ", "Purple "];
Which of the following function is used to define an alternative sort order?
- A) None of the above.
- B) Alternative function.
- C) Comparison function.
- D) Compare function.
Which of the following is NOT true about JavaScript?
- A) JavaScript can change HTML Attributes.
- B) JavaScript can not change HTML Content.
- C) JavaScript can change HTML Content.
- D) None of the given options
Associative arrays are also called __________.
- A) hashes
- B) smashes.
- C) slashes.
- D) mashes
Which of the following is NOT a jQuery Sliding Methods?
- A) slideUp()
- B) slideDown()
- C) slideToggle()
- D) slideSwitch()
Which of the following is true about Bit operators?
- A) Bit operators work on 256-bit numbers
- B) Bit operators work on 32-bit numbers.
- C) Bit operators work on 128-bit numbers.
- D) Bit operators work on 64-bit numbers.
Java script code is written within the file having extension of____________.
- A) .jvs
- B) .js
- C) .jvm
- D) .j
JavaScript is ______ side scripting language.
- A) ISP
- B) Server Side
- C) Both Client and Server Side
- D) Client Side
What will be the resulting array after execution of the following commands? var colour = ["Blue", "Pink", "Purple", "Black"]; colour.pop();
- A) ["Blue", "Purple", "Black"];
- B) ["Blue", "Pink", "Purple"];
- C) ["Pink", "Purple", "Black"];
- D) ["Blue", "Pink", "Black"];
Java Script is designed to ____________.
- A) Execute database queries on webpages
- B) To add server side operations
- C) Add interactivity on HTML pages
- D) Style HTML pages
The $(document).ready() method allows us to execute a function when,
- A) None of the given options
- B) Document is fully loaded
- C) Document is partially loaded
- D) Document is about to load
What is the function of responseText in AJAX?
- A) get the response data as XML data
- B) All of the given options
- C) get the response data as a string
- D) get the response data as an integer
To sort an array in descending order, sort() function can be used with the combination of __________ function.
- A) Concat()
- B) Reverse()
- C) Slice()
- D) Shift()
Which of the following function is used to remove last element of the array?
- A) Delete()
- B) Shift()
- C) Pop()
- D) Push()
Choose the correct syntax to create an array students in JavaScript?
- A) var students = {"Ali", "Ahmed", "Noor"};
- B) var students[] = {"Ali", "Ahmed", "Noor"};
- C) var students ["Ali", "Ahmed", "Noor"];
- D) var students = ["Ali", "Ahmed", "Noor"];
Which of the following is NOT a way to join multiple words into one variable name in JavaScript?
- A) Camel Case
- B) Underscore
- C) Semicolon
- D) Hyphens