JavaScript 1 - 11 Questions

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Drake811
D
Drake811
Community Contributor
Quizzes Created: 2 | Total Attempts: 346
Questions: 11 | Attempts: 246

SettingsSettingsSettings
JavaScript Quizzes & Trivia

Do You Know JavaScript


Questions and Answers
  • 1. 

    Java Script File Has An Extension Of

    • A.

      .Java

    • B.

      .Js

    • C.

      .javascript

    • D.

      .xml

    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.

    Rate this question:

  • 2. 

    The Tag is used To Give Heading To The Table

    • A.

      Head

    • B.

      Td

    • C.

      Th

    • D.

      Caption

    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.

    Rate this question:

  • 3. 

    IsNaN() Evalutes And Argument To Determine if Given Value

    • A.

      Is Not a Null

    • B.

      Is Not a Number

    • C.

      Is Not a New Object

    • D.

      None Of The Above

    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.

    Rate this question:

  • 4. 

    Function is Used To Parse a String To Int

    • A.

      Integer.Parse

    • B.

      Int.Parse

    • C.

      Parse.Int

    • D.

      None

    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.

    Rate this question:

  • 5. 

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

    • A.

      Alert()

    • B.

      Prompt()

    • C.

      Confirm()

    • D.

      Msg()

    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.

    Rate this question:

  • 6. 

    ______  Event is Used To Check An Empty Text Box

    • A.

      Onclick()

    • B.

      OnFocus()

    • C.

      OnBlur()

    • D.

      None

    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.

    Rate this question:

  • 7. 

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

    • A.

      One

    • B.

      Two

    • C.

      Three

    • D.

      Zero

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

    Rate this question:

  • 8. 

    GetMonth() returns The Month as

    • A.

      Int

    • B.

      Float

    • C.

      Char

    • D.

      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

    • A.

      OnSubmit()

    • B.

      OnLoad()

    • C.

      IsPostBack()

    • D.

      Onclick()

    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.

    Rate this question:

  • 10. 

    A Function Associated With An object is Called

    • A.

      Function

    • B.

      Method

    • C.

      Link

    • D.

      None

    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.

    Rate this question:

  • 11. 

    Inside which HTML element do we put the JavaScript?

    • A.

      Js

    • B.

      JavaScript

    • C.

      Script

    • D.

      Scripting

    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.

    Rate this question:

Quiz Review Timeline +

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.