Top 350+ Solved Web Technology MCQ Questions Answer
Q. When does JavaScript code appear inline within an HTML file?
a. Between the “script” tag
b. Outside the “script” tag
c. Both a and b
d. None of the mentioned
Q. What is the default value of the type attribute in javascript?
a. text/css
b. text/javascript
c. text
d. xml
Q. What are the objects in Java Script?
a. Document object
b. Window object
c. Form object
d. All of the above
Q. The escape sequence ‘\f’ stands for
a. Floating numbers
b. Representation of functions that returns a value
c. \f is not present in JavaScript
d. Form feed
Q. The snippet that has to be used to check if “a” is not equal to “null” is
a. if(a!=null)
b. if (!a)
c. if(a!null)
d. if(a!==null)
Q. Consider the following statements var text = "testing: 1, 2, 3"; // Sample text var pattern = /\d+/g In order to check if the pattern matches with the string “text”, the statement is
a. text==pattern
b. pattern.test(text)
c. text.test(pattern)
d. text.equals(pattern)
Q. A function definition expression can be called
a. Function prototype
b. Function literal
c. Function definition
d. Function declaration
Q. JavaScript is a _______________ language
a. Object-Oriented
b. High-level
c. Assembly-language
d. Object-Based
Q. A conditional expression is also called a
a. Alternate to if-else
b. Immediate if
c. If-then-else statement
d. None of the above