Javascript Basics MCQ Quiz in मराठी - Objective Question with Answer for Javascript Basics - मोफत PDF डाउनलोड करा

Last updated on Mar 11, 2025

पाईये Javascript Basics उत्तरे आणि तपशीलवार उपायांसह एकाधिक निवड प्रश्न (MCQ क्विझ). हे मोफत डाउनलोड करा Javascript Basics एमसीक्यू क्विझ पीडीएफ आणि बँकिंग, एसएससी, रेल्वे, यूपीएससी, स्टेट पीएससी यासारख्या तुमच्या आगामी परीक्षांची तयारी करा.

Latest Javascript Basics MCQ Objective Questions

Top Javascript Basics MCQ Objective Questions

Javascript Basics Question 1:

Which of the following is suitable tag for java script in HTML?

  1. < java >< java >
  2. < script >< /script >
  3. < jvm >< /jvm >
  4. < JS >< /JS >
  5. < !--xml >< /!--xml >

Answer (Detailed Solution Below)

Option 2 : < script >< /script >

Javascript Basics Question 1 Detailed Solution

The HTML < script > tag is used to embed or reference a client-side script such as JavaScript. This tag is also commonly referred to as the < script > element.

Syntax

There are two ways that you can use the

  • < head > ....
  • < body > ….
  • Answer (Detailed Solution Below)

    Option 2 : < script > ....

    Javascript Basics Question 2 Detailed Solution

    JavaScript was created to make webpages. Programs in the language are known as scripts. These scripts are executed as plain text. JavaScript has full integration with HTML/CSS.

    JavaScript programs are inserted into any part of the HTML document with the help of

    Javascript Basics Question 3:

    Which of the following attributes of text-box control, allow to limit the maximum character?

    1. size
    2. len
    3. max length
    4. All of these

    Answer (Detailed Solution Below)

    Option 3 : max length

    Javascript Basics Question 3 Detailed Solution

    In HTML, the max length attribute specifies the maximum number of characters allowed in the element. The default value is 524288.

    Syntax:

    Value is the maximum number of characters allowed in the element.

    Javascript Basics Question 4:

    Which of the following dialog boxes is used to give warning message to the users?

    1. Alert dialog box
    2. Confirmation dialog box
    3. Prompt dialog box
    4. Warning dialog box
    5. None of the above

    Answer (Detailed Solution Below)

    Option 1 : Alert dialog box

    Javascript Basics Question 4 Detailed Solution

    An alert dialog box is mostly used to give a warning message to the users. For example, if one input field requires to enter some text but the user does not provide any input, then as a part of validation, you can use an alert box to give a warning message. Alert box gives only one button "OK" to select and proceed.

    Javascript Basics Question 5:

    What is the correct CSS code for adding a background color?

    1. yellow
    2. None of above

    Answer (Detailed Solution Below)

    Option 4 :

    Javascript Basics Question 5 Detailed Solution

    CSS syntax:

    Colour(options)

    Example

    Description

     ccolour_name

     Red

     Name of colour

     hex_number

     #ff0000

     Hexadecimal colour code 

     Rgb_number

     rgb(255,36,0) 

     rgb colour code

    Javascript Basics Question 6:

    What is the output of the below code?

    var x=21;  

    if(x > 23) {  

    document.write(22);  

    }  

    else {  

    document.write(x);  

    }

    1. 21
    2. 22
    3. 23
    4. Undefined

    Answer (Detailed Solution Below)

    Option 1 : 21

    Javascript Basics Question 6 Detailed Solution

    The "if-else" is one of the conditional statements available in JavaScript like several other languages.

    Code:

    int x=21;  

    if(x > 23) {   /false

    document.write(22);  

    else {              

    document.write(x);  / It will be executed

    }

    Javascript Basics Question 7:

    In VB Script, which of the following function return the date for a specified year, month, and day?

    1. CDate
    2. Date
    3. IsDate
    4. DateSerial

    Answer (Detailed Solution Below)

    Option 4 : DateSerial

    Javascript Basics Question 7 Detailed Solution

    Following are the Date Function used in VB Script 

    CDate - Converts a valid date and time expression to the variant of subtype Date

    Date - Returns the current system date

    DateAdd - Returns a date to which a specified time interval has been added

    DateSerial - Return the date for a specified year, month, and day

    Therefore Option 4 is correct

    Javascript Basics Question 8:

    What is the proper syntax when using a message dialog box?

    1. MessageBox.Show(“Hello”, “Testbook”)
    2. MessageBox.Show(Hello, Testbook)
    3. MessageBox.Show “Hello”, “Testbook”
    4. MessageBox.Show Hello, Testbook

    Answer (Detailed Solution Below)

    Option 1 : MessageBox.Show(“Hello”, “Testbook”)

    Javascript Basics Question 8 Detailed Solution

    A message box is a special dialog box used to display a piece of information to the user. To support message boxes, the Visual Basic language provides a function named MsgBox.

    Syntax:

    MsgBox(Message)

    To create a message box using the .NET Frameworkwe use Show() method of the MessageBox class using the following formula:

    MessageBox.Show(Message)

    Therefore Option 1 is correct

    Javascript Basics Question 9:

    Node.js uses _____ on the server.

    1. JavaScript
    2. Java
    3. PHP
    4. ASP.NET

    Answer (Detailed Solution Below)

    Option 1 : JavaScript

    Javascript Basics Question 9 Detailed Solution

    • Node.js is an open source server environment
    • Node.js is free
    • Node.js runs on various platforms like Windows, Linux, Unix, Mac etc.
    • Node.js uses JavaScript on the server

    Javascript Basics Question 10:

    What is the output of the following program?

    #include
    using namespace std;
    class OS
    {
    public:
    void display()
    {
    cout << "Operating System\t";
    }
    };
    class Windows: public OS
    {
    public:
    void display()
    {
    cout << "Windows\t";
    OS::display();
    }
    };
    int main()
    {
    Windows w;
    w.display();
    }

    1. Windows
    2. Operating System
    3. Windows Operating System
    4. None of above

    Answer (Detailed Solution Below)

    Option 3 : Windows Operating System

    Javascript Basics Question 10 Detailed Solution

    The above code implements a function overriding concept. When an object of the derived class is created (i.e. w) and call the member function(display ()), the member function of the derived class is invoked and the function of the base class is ignored. After invoking the display () method of class windows, it will print ‘windows’. Now at OS :: display() overridden function of base class i.e. display() method of class OS will get executed. Hence it will print Operating system.

    Output: Windows Operating System.

    Note:- For better understanding try to run the above program.

    Hot Links: teen patti 100 bonus teen patti winner teen patti master list