JavaScript 1 - 11 Questions

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 Drake811
D
Drake811
Community Contributor
Quizzes Created: 2 | Total Attempts: 449
| Attempts: 344
SettingsSettings
Please wait...
  • 1/11 Questions

    Java Script File Has An Extension Of

    • .Java
    • .Js
    • .javascript
    • .xml
Please wait...
JavaScript Quizzes & Trivia
About This Quiz

This quiz titled 'JavaScript 1 - 11 questions' assesses fundamental knowledge of JavaScript, focusing on syntax, functions, and interactive elements. It's designed for learners to validate their understanding of JavaScript essentials, enhancing web development skills.


Quiz Preview

  • 2. 

    The Tag is used To Give Heading To The Table

    • Head

    • Td

    • Th

    • Caption

    Correct Answer
    A. 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.

    Rate this question:

  • 3. 

    IsNaN() Evalutes And Argument To Determine if Given Value

    • Is Not a Null

    • Is Not a Number

    • Is Not a New Object

    • None Of The Above

    Correct Answer
    A. 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.

    Rate this question:

  • 4. 

    Function is Used To Parse a String To Int

    • Integer.Parse

    • Int.Parse

    • Parse.Int

    • None

    Correct Answer
    A. 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.

    Rate this question:

  • 5. 

    Which Of The Dialog Box Display a Message And a Data Entry Field

    • Alert()

    • Prompt()

    • Confirm()

    • Msg()

    Correct Answer
    A. 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.

    Rate this question:

  • 6. 

    ______  Event is Used To Check An Empty Text Box

    • Onclick()

    • OnFocus()

    • OnBlur()

    • None

    Correct Answer
    A. 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.

    Rate this question:

  • 7. 

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

    • One

    • Two

    • Three

    • Zero

    Correct Answer
    A. Two
    Explanation
    The method Prompt() contains two parameters.

    Rate this question:

  • 8. 

    GetMonth() returns The Month as

    • Int

    • Float

    • Char

    • String

    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.

    Rate this question:

  • 9. 

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

    • OnSubmit()

    • OnLoad()

    • IsPostBack()

    • Onclick()

    Correct Answer
    A. 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.

    Rate this question:

  • 10. 

    A Function Associated With An object is Called

    • Function

    • Method

    • Link

    • None

    Correct Answer
    A. 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.

    Rate this question:

  • 11. 

    Inside which HTML element do we put the JavaScript?

    • Js

    • JavaScript

    • Script

    • Scripting

    Correct Answer
    A. 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.

    Rate this question:

Quiz Review Timeline (Updated): Mar 21, 2023 +

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

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 03, 2015
    Quiz Created by
    Drake811
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.