Quiz Of JavaScript For The Students For Academic Degree

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 Abhijeetjadeja
A
Abhijeetjadeja
Community Contributor
Quizzes Created: 2 | Total Attempts: 1,447
Questions: 16 | Attempts: 1,069

SettingsSettingsSettings
JavaScript Quizzes & Trivia

This quiz give the over view of javascirpt for the students for academic degree like BCA , MCA , Msc-IT , MSC CS , PGDCA as well as private course running regarding IT. . . WISH U ALL THE VERY BEST


Questions and Answers
  • 1. 

    How can we starts Javascript ?

    • A.

      Script tag

    • B.

      Javascript tag

    • C.

      Language tag

    • D.

      None of above

    Correct Answer
    A. Script tag
    Explanation
    To start JavaScript, we can use the "script" tag. This tag is used to define a client-side script, such as JavaScript, within an HTML document. By placing the JavaScript code within the "script" tags, the browser knows to interpret and execute the code. This allows us to include JavaScript functionality and interactivity on our webpages. The other options mentioned (javascript tag, language tag, none of above) are not valid ways to start JavaScript.

    Rate this question:

  • 2. 

    Is javascript case sensitive ?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    JavaScript is indeed case sensitive. This means that it distinguishes between uppercase and lowercase letters. For example, variables named "myVariable" and "myvariable" would be treated as two separate variables. Similarly, functions or object names must be referenced with the exact casing used when they were declared. Therefore, "True" is the correct answer as JavaScript is case sensitive.

    Rate this question:

  • 3. 

    In script tag what are the attribute we can use  what are the attribute we can use ? what attribute we can use ?

    • A.

      Case

    • B.

      Language

    • C.

      Type

    • D.

      Section

    • E.

      Tract

    Correct Answer(s)
    B. Language
    C. Type
    Explanation
    The question is asking for the attributes that can be used in a script tag. The correct answer is "language" and "type". These attributes are commonly used in script tags to specify the programming language and type of the script being included.

    Rate this question:

  • 4. 

    How can we declare variable in javascript

    • A.

      Datatype

    • B.

      Var

    • C.

      Int

    • D.

      Float

    Correct Answer
    B. Var
    Explanation
    In JavaScript, we can declare a variable using the "var" keyword. This keyword is used to create a new variable and assign a value to it. It is followed by the variable name, which can be any valid identifier, and optionally, we can also specify the data type of the variable. The "var" keyword is essential for declaring variables in JavaScript and is widely used in coding practices.

    Rate this question:

  • 5. 

    .length is ____________

    Correct Answer
    property
    Explanation
    The ".length" is a property in many programming languages, including JavaScript. It is used to retrieve the length or size of a string, array, or other data structure. The property returns the number of characters in a string or the number of elements in an array. Therefore, ".length" is a property.

    Rate this question:

  • 6. 

    .push () is which type of function

    • A.

      Date and time

    • B.

      String

    • C.

      Array

    • D.

      Maths / numeric

    Correct Answer
    C. Array
    Explanation
    The .push() function is a method used to add one or more elements to the end of an array. It modifies the original array by adding the elements at the end. Therefore, the correct answer is "array" as .push() is a function that specifically operates on arrays.

    Rate this question:

  • 7. 

    Script tag used in which part tag is used in _____________?

    • A.

      Only head tag

    • B.

      Only body tag

    • C.

      Head tag and body tag both

    • D.

      None of above

    Correct Answer
    C. Head tag and body tag both
    Explanation
    The script tag is used in both the head tag and the body tag. It is commonly used to include or reference external JavaScript files in a web page. Placing the script tag in the head tag allows the browser to load and parse the JavaScript file before rendering the rest of the page. On the other hand, placing the script tag in the body tag allows the JavaScript to be executed after the page has been rendered, which can be useful for manipulating the DOM or interacting with elements on the page.

    Rate this question:

  • 8. 

    If we want to print any message in message box we use ___________ in javascript

    • A.

      Promptbox

    • B.

      Confirmbox

    • C.

      Alertbox

    • D.

      None of above

    Correct Answer
    C. Alertbox
    Explanation
    In JavaScript, if we want to display a message in a message box, we use the "alert" function. This function displays a pop-up box with the specified message and an "OK" button for the user to acknowledge the message. Therefore, the correct answer is "alertbox". The other options mentioned, such as "promptbox" and "confirmbox", are not valid functions in JavaScript for displaying messages in a message box.

    Rate this question:

  • 9. 

    To take value from user at runtime we use _________

    • A.

      Promptbox

    • B.

      Alertbox

    • C.

      Confirmbox

    • D.

      None

    Correct Answer
    A. Promptbox
    Explanation
    To take value from the user at runtime, we use a promptbox. The promptbox is a built-in function in JavaScript that displays a dialog box with a message prompting the user to input data. It allows the user to enter a value, which can then be stored in a variable or used for further processing in the program. This method is commonly used when interactive input is required from the user during program execution.

    Rate this question:

  • 10. 

    Take choice from user either yes and no or cancel we use ________

    • A.

      Promptbox

    • B.

      Alertbox

    • C.

      Confirmbox

    • D.

      None of above

    Correct Answer
    C. Confirmbox
    Explanation
    When we want to take a choice from the user with options such as "yes" and "no" or "cancel", we use a confirmbox. A confirmbox is a dialog box that pops up and displays a message to the user along with buttons for different options. The user can then select one of the options provided. Therefore, the correct answer is confirmbox.

    Rate this question:

  • 11. 

    In do-while .. while with condition required ';' at the end of () 

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    In a do-while loop, the condition is checked at the end of each iteration. The condition is enclosed within parentheses, and a semicolon is required at the end of the parentheses to indicate the end of the condition. This is necessary for the proper syntax of the do-while loop. Therefore, the statement "in do-while .. while with condition required ';' at the end of ()" is true.

    Rate this question:

  • 12. 

    What is the use of document.getElementById("...").value in javascript

    • A.

      To take value from any form tool

    • B.

      To take value from only textbox

    • C.

      To input some value in javascript

    • D.

      None of above

    Correct Answer
    A. To take value from any form tool
    Explanation
    The correct answer is "to take value from any form tool". The document.getElementById("...").value in JavaScript is used to retrieve the value of an input element or form tool on a webpage. It can be used to obtain the value from various form tools such as textboxes, checkboxes, radio buttons, dropdown menus, etc. This method allows developers to access and manipulate the values entered by users in a web form.

    Rate this question:

  • 13. 

    What is the use of document.getElementById("...").innerHTML="[message]"

    • A.

      To show our output in any tool

    • B.

      To show our output in only textbox

    • C.

      To display answer in alertbox

    • D.

      None of above

    Correct Answer
    A. To show our output in any tool
    Explanation
    The correct answer is "to show our output in any tool". The document.getElementById("...").innerHTML=" [message]" is used to manipulate the content of an HTML element with the specified ID. By setting the innerHTML property to a specific value, we can display our desired output in any HTML element, not just limited to a textbox or an alert box.

    Rate this question:

  • 14. 

    When we use function and onClick event as example is it must to use <script> and function in <head> only ?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The answer is true because when using a function and onClick event as an example, it is necessary to include the script tag and define the function within the head section of the HTML document. This is because the head section is where the script tag is typically placed to ensure that the function is loaded and available before the rest of the page is rendered. Placing the script tag and function in the head section ensures that the function can be called and executed properly when the onClick event is triggered.

    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 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 12, 2013
    Quiz Created by
    Abhijeetjadeja
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.