JavaScript Test: GK Quiz! Trivia

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Tannu
T
Tannu
Community Contributor
Quizzes Created: 1 | Total Attempts: 7,935
| Attempts: 7,935 | Questions: 11
Please wait...
Question 1 / 11
0 %
0/100
Score 0/100
1. JavaScript File Has An Extension of:

Explanation

The correct answer is ".Js" because in JavaScript, the file extension is typically ".js". This extension is used to identify files that contain JavaScript code. By convention, JavaScript files are saved with this extension to make it clear that they contain JavaScript code that can be executed by a JavaScript engine. Other file extensions listed in the options such as ".Java", ".javascript", and ".xml" are not commonly used for JavaScript files.

Submit
Please wait...
About This Quiz
JavaScript Test: GK Quiz! Trivia - Quiz

JavaScript is a programming language that enables you to carry out complex items on web pages. It's a scripting language that helps create rich, updated content, including multimedia,... see moreanimated images, graphics, etc. Javascript was developed to make web pages live, also known as "Live Script." This quiz will test your knowledge about the functions and basics of Javascript.
see less

2. If Button is clicked .......Event Handler is invoked.

Explanation

When a button is clicked, the event handler associated with it is invoked. In this case, the correct answer is "Onclick()" because it is the event that is triggered when the button is clicked. The other options, "OnSubmit()", "OnLoad()", and "IsPostBack()" are not relevant in this context as they are not specific to button clicks.

Submit
3. IsNaN() Evaluates And Argument To Determine if Given Value:

Explanation

The function isNaN() evaluates an argument to determine if the given value is not a number. It checks whether the argument is a numeric value or can be converted into one. If the argument is not a number, the function returns true; otherwise, it returns false.

Submit
4. A Function Associated With An object is Called:

Explanation

A function associated with an object is called a method. In object-oriented programming, a method is a behavior that an object can perform. It is defined within a class and can access and manipulate the data of the object it belongs to. Methods are used to encapsulate related functionality and provide a way to interact with objects. They are called using the dot notation, where the object name is followed by the method name.

Submit
5. Which Of The Dialog Box Display a Message And a Data Entry Field?

Explanation

The prompt() function displays a dialog box that contains a message and a data entry field. This allows the user to enter information or provide a response to the prompt. The other options (alert(), confirm(), and msg()) do not display a data entry field, making prompt() the correct answer.

Submit
6. GetMonth() returns The Month as:

Explanation

The getMonth() function in programming languages such as Java or JavaScript returns the month as an integer. This means that the function will provide the numerical representation of the month, typically ranging from 0 to 11, where 0 represents January and 11 represents December. Using an integer to represent the month allows for easier manipulation and comparison of dates within a program.

Submit
7. Method Prompt() Contain ........Number of Parameters.

Explanation

The method Prompt() contains two parameters.

Submit
8. Function is Used To Parse a String To Int:

Explanation

Int.Parse is the correct answer because it is a function used to convert a string representation of a number into its integer equivalent. It takes a string as input and returns the integer value. This function is commonly used in programming to convert user input or data stored as strings into integers for mathematical operations or other purposes.

Submit
9. Event is Used To Check An Empty Text Box:

Explanation

The onBlur() event is used to check if a text box is empty. This event is triggered when the user moves away from the text box, indicating that they have finished entering text. By using the onBlur() event, developers can validate the input and display an error message if the text box is empty. The other options, onclick() and onFocus(), do not specifically check for an empty text box. Therefore, the correct answer is onBlur().

Submit
10. Inside which HTML element do we put the JavaScript?

Explanation



JavaScript code is typically placed within the <script> element in HTML documents. This element is used to define client-side JavaScript code that interacts with the HTML content of a webpage. It can be placed either in the <head> or <body> section of the HTML document.
Submit
11. The ____________ Tag is used To Give Heading To The Table.

Explanation

The correct answer is "caption". In HTML, the "caption" tag is used to give a heading to the table. It is placed immediately after the opening "table" tag and before the "tr" and "td" tags. The "caption" tag helps provide a title or description for the table, making it easier for users to understand its content or purpose.

Submit
View My Results

Quiz Review Timeline (Updated): Apr 3, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Apr 03, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 21, 2008
    Quiz Created by
    Tannu
Cancel
  • All
    All (11)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
JavaScript File Has An Extension of:
If Button is clicked .......Event Handler is invoked.
IsNaN() Evaluates And Argument To Determine if Given Value:
A Function Associated With An object is Called:
Which Of The Dialog Box Display a Message And a Data Entry Field?
GetMonth() returns The Month as:
Method Prompt() Contain ........Number of Parameters.
Function is Used To Parse a String To Int:
Event is Used To Check An Empty Text Box:
Inside which HTML element do we put the JavaScript?
The ____________ Tag is used To Give Heading To The Table.
Alert!

Advertisement