Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

Variables declared inside function are visible _______________.

A. Inside the function in which it is declared
B. to all the functions
C. All the scripts inside save JS File
D. None of these
Answer» B. to all the functions
2.

JavaScript code contain sequence of ___________.

A. HTML Tags
B. Method Calls
C. Executable Statements
D. All of these
Answer» E.
3.

Local Variables are Destroyed as soon as ______________.

A. user closes the browser
B. page gets completely loaded
C. control comes outside the method
D. None of these
Answer» D. None of these
4.

Which of the following is a server-side Java Script object?

A. Function
B. File
C. FileUpload
D. Date
Answer» C. FileUpload
5.

Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts) ?

A. type
B. defer
C. async
D. parse
Answer» C. async
6.

Executable single line of Script is called as _________________.

A. Statement in JavaScript
B. Breakpoint in JS
C. Line in JS
D. None of these
Answer» B. Breakpoint in JS
7.

Microsoft Developed a compatible dialect of JavaScript called _____________.

A. JScript
B. MS JavaScript
C. MJavaScript
D. Advanced JavaScript
Answer» B. MS JavaScript
8.

We can declare all type of variables in JavaScript with the keyword _____________.

A. var
B. obj
C. jvar
D. None of these
Answer» B. obj
9.

+Infinity in JS gets added with +Infinity then output of the code will be

A.
B. +Infinity
C. -Infinity
D. Null
Answer» C. -Infinity
10.

-Infinity in JS gets added with -Infinity then output of the code will be

A. +Infinity
B.
C. -Infinity
D. None of the above
Answer» D. None of the above
11.

State the correct place of JS Code inside HTML -

A. Inside Body
B. Inside Head
C. Inside Single JavaScript File
D. All of these
Answer» E.
12.

JS Comment can be used for following purposes -

A. to Hide Non-usable line
B. to Hide Non-usable Multiline Code
C. used for Documentation
D. All of these
Answer» E.
13.

Comment Statement is _________________ type of statement.

A. Executive
B. Non Important
C. Non Executable
D. Non Usable
Answer» D. Non Usable
14.

During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?

A.
B. Zero
C. Infinite
D. Null
Answer» B. Zero
15.

____________ is used to assign value to the variable.

A. Assignment Statement in JavaScript
B. Declaration Statement
C. Conditional Statement
D. Executable Statement
Answer» B. Declaration Statement
16.

Which of the following is considered as End of Single line comment ?

A. End of Line
B. Semicolon
C. End of Statement
D. "*/" Symbol
Answer» B. Semicolon
17.

Which of the following function of String object returns a number indicating the Unicode value of the character at the given index?

A. charAt()
B. charCodeAt()
C. concat()
D. indexOf()
Answer» C. concat()
18.

Single Line Comment in JavaScript Starts with _________ Symbol.

A. "\\"
B. "//"
C. "$$"
D. "#"
Answer» C. "$$"
19.

If the values on either side of '+' operator are numerical values then ___________.

A. values are concatenated together
B. values are added together
C. no effect
D. None of These
Answer» C. no effect
20.

var var1 = "Pritesh";Above variable can store value of type -

A. Integer
B. String
C. Any Type
D. None of these
Answer» C. Any Type
21.

Which of the following is a valid type of function javascript supports?

A. named function
B. anonymous function
C. Both of the above
D. None of the above
Answer» D. None of the above
22.

JavaScript contains a _________________ that assigns a value to a variable based on some condition.

A. Bitwise Operator
B. Logical Operator
C. Assignment operator
D. Conditional operator
Answer» E.
23.

Adding String and Integer always results in _________.

A. Character
B. String
C. Integer
D. None of these
Answer» C. Integer
24.

We use _______ style comment to prevent showing Java Script as Content in the old browsers.

A. JS
B. CSS
C. HTML
D. C
Answer» D. C
25.

"++" is __________ type of operator.

A. Ternary
B. Binary
C. Unary
D. None of these
Answer» D. None of these
26.

JavaScript Statements are executed by ________ .

A. Server
B. JVM
C. Compiler
D. Browser
Answer» E.
27.

Which built-in method returns the calling string value converted to upper case?

A. toUpperCase()
B. toUpper()
C. changeCase(case)
D. None of the above.
Answer» B. toUpper()
28.

Which of the following is correct about JavaScript?

A. JavaScript is a lightweight, interpreted programming language.
B. JavaScript has object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.
C. The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.
D. All of the above.
Answer» E.
29.

Which of the following is the correct syntax to print a page using JavaScript?

A. window.print();
B. browser.print();
C. navigator.print();
D. document.print();
Answer» B. browser.print();
30.

Which of the following type of variable is visible only within a function where it is defined?

A. global variable
B. local variable
C. Both of the above.
D. None of the above.
Answer» C. Both of the above.
31.

Which of the following is true about variable naming conventions in JavaScript?

A. You should not use any of the JavaScript reserved keyword as variable name.
B. JavaScript variable names should not start with a numeral (0-9).
C. Both of the above.
D. None of the above.
Answer» D. None of the above.
32.

Which of the following function of String object causes a string to be displayed as struck-out text, as if it were in a strike tag?

A. sup()
B. small()
C. strike()
D. sub()
Answer» D. sub()
33.

Which of the following function of Number object returns the number's value?

A. toString()
B. valueOf()
C. toLocaleString()
D. toPrecision()
Answer» C. toLocaleString()
34.

Which of the following function of String object returns the index within the calling String object of the first occurrence of the specified value?

A. substr()
B. search()
C. lastIndexOf()
D. indexOf()
Answer» E.
35.

WHAT_IS_THE_PURPOSE_OF_THE_METHOD_PAR()??$

A. Makes the text vertical
B. Makes the text horizontal
C. Makes the text diagonal
D. None of the mentioned
Answer» C. Makes the text diagonal
36.

WHICH_IS_THE_METHOD_USED_TO_DRAW_A_BAR_PLOT??$

A. bar_plot()
B. plot(bar)
C. barplot()
D. plotbar()
Answer» D. plotbar()
37.

What is the purpose of the method par()?$

A. Makes the text vertical
B. Makes the text horizontal
C. Makes the text diagonal
D. None of the mentioned
Answer» C. Makes the text diagonal
38.

Which is the method used to draw a bar plot?

A. bar_plot()
B. plot(bar)
C. barplot()
D. plotbar()
Answer» D. plotbar()
39.

Which of the following are methods used to save charts?

A. pdf()
B. jpeg()
C. bmp()
D. all of the mentioned
Answer» E.
40.

Which is the method used to save chart as a ps file?

A. ps()
B. postscript()
C. script()
D. post(script)
Answer» C. script()
41.

How to save chart as a Window metafile?

A. metafile()
B. win.metafile()
C. file()
D. metawin()
Answer» C. file()
42.

What is the purpose of the method symbols in R?

A. Draw symbols
B. Draw other shapes
C. Draw symbols and other shapes
D. None of the mentioned
Answer» C. Draw symbols and other shapes
43.

Which of the following is the initial function used to create a bubble chart natively in R?

A. init()
B. chart(bubble)
C. symbols()
D. none of the mentioned
Answer» D. none of the mentioned
44.

What is the need for bubble charts?

A. Represent 2D data
B. Represent 3D data
C. Represent 2D and 3D data
D. None of the mentioned
Answer» C. Represent 2D and 3D data
45.

How many parameters does the method plot() accept?

A. 6
B. 7
C. 8
D. 9
Answer» E.
46.

What is the purpose of the method plot()?

A. Displays symbols
B. Displays charts
C. Displays symbols and charts
D. None of the mentioned
Answer» C. Displays symbols and charts