1. Question:What do you mean by objects? write 5 built in objects in JavaScript. 

    Answer
    Object: Objects are collection of properties in a hierarchy.
    Five built-in objects in JavaScript:
    1.Window.prompt()
    2.window.alert()
    3.Math.floor()
    4.Math.max()
    5.document.write()






    1. Report
  2. Question:What is Regular Expression? 

    Answer
    Regular Expression is an object that describes the pattern of characters.
    Regular expressions are used to perform pattern-matching and "search-and-replace" functions on text.






    1. Report
  3. Question:What is the function of floor(), ceil() and round() methods of Math object? 

    Answer
    Math.round(): The round() method of Math Objects rounds the numeric data to the nearest integer.
    Math.floor(): The floor() method of Math objects returns the input data, rounded downwards to the nearest integer.
    Math.ceil(): The ceil() method of Math objects returns the input data, rounded upwards to the nearest integer.






    1. Report
  4. Question:What is the difference between undefined value and null value? 

    Answer
    An undefined value is returned when we attempt to use a variable that has not been defined or that is declared but that we forgot to provide with a value.
    On the otherhand, null value is returned when we declare and define a variable as null if we want absolutely nothing in it but we don't want it to be undefined.






    1. Report
  5. Question:What are the difference between alert() and prompt()? 

    Answer
    Alert(): The alert() function displays a message on the web page for the users. In this case the users need nothing to do except click to close to it.
    prompt(): The prompt() function also displays a message/statements for the users but in this the users can also input data in the input box.






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd