1.
Java Script File Has An Extension Of
Correct Answer
B. .Js
Explanation
A JavaScript file has an extension of .Js. This is the standard file extension used for JavaScript files. The .Js extension helps to identify the file as a JavaScript file and allows it to be recognized and executed by JavaScript engines or interpreters. Other file extensions mentioned in the question such as .Java, .javascript, and .xml are not commonly used for JavaScript files.
2.
The Tag is used To Give Heading To The Table
Correct Answer
D. Caption
Explanation
The correct answer is "caption". The caption tag is used to give a heading to a table. It is typically placed at the top of the table and provides a brief description or title for the table. This helps to give context and clarity to the table content for the readers. The caption tag is not used for individual table cells or table headers (th), but specifically for the table as a whole.
3.
IsNaN() Evalutes And Argument To Determine if Given Value
Correct Answer
B. Is Not a Number
Explanation
The correct answer is "is Not a Number". The isNaN() function is used to check if a value is not a number. It evaluates the argument provided and returns true if the argument is not a number, and false otherwise. This function is commonly used to validate user input in JavaScript to ensure that a numerical value is entered.
4.
Function is Used To Parse a String To Int
Correct Answer
B. Int.Parse
Explanation
Int.Parse is the correct answer because it is a function that is used to parse a string into an integer. This function takes a string as input and converts it into its corresponding integer representation. It is commonly used when working with user input or when converting string representations of numbers into their numerical form for mathematical operations. The other options mentioned, such as Integer.Parse and Parse.Int, are not valid functions in most programming languages and therefore are incorrect answers.
5.
Which Of The Dialog Box Display a Message And a Data Entry Field
Correct Answer
B. Prompt()
Explanation
The prompt() function displays a dialog box with a message and a data entry field. This allows the user to enter a value or input in response to the displayed message. Therefore, prompt() is the correct answer as it fulfills the requirement of displaying both a message and a data entry field in a dialog box.
6.
______ Event is Used To Check An Empty Text Box
Correct Answer
C. OnBlur()
Explanation
The onBlur() event is used to check an empty text box. This event is triggered when the user moves the focus away from the text box. By using onBlur(), we can validate whether the text box is empty or not and perform any necessary actions accordingly. The onClick() and onFocus() events are not specifically designed for checking empty text boxes, while the "None" option is not a valid event in this context.
7.
Method Prompt() Contain ........Number of Parameters
Correct Answer
B. Two
Explanation
The method Prompt() contains two parameters.
8.
GetMonth() returns The Month as
Correct Answer
A. Int
Explanation
The getMonth() function returns the month as an integer. This means that the value returned by the function will be a whole number representing the month. For example, January would be represented as 1, February as 2, and so on. The use of an integer to represent the month allows for easy comparison and manipulation of dates and months in programming.
9.
If ______ Button is clicked .......Event Handler is invoked
Correct Answer
D. Onclick()
Explanation
When the "Onclick()" button is clicked, the event handler associated with it will be invoked. This means that a specific function or code block will be executed in response to the button click event. The "Onclick()" event handler is commonly used to perform actions such as submitting a form, navigating to a different page, or displaying a message.
10.
A Function Associated With An object is Called
Correct Answer
B. Method
Explanation
A function associated with an object is called a method. In object-oriented programming, methods are used to define the behavior or actions that an object can perform. They are typically defined within a class and can access the object's data and other methods. Methods are invoked on specific objects and can modify the object's state or return a value. Unlike functions, which are standalone and can be called independently, methods are closely tied to the object they belong to and are called using dot notation.
11.
Inside which HTML element do we put the JavaScript?
Correct Answer
C. Script
Explanation
In HTML, we put JavaScript code inside the element. This element is used to define or reference an external JavaScript file, or to embed JavaScript code directly within an HTML document.