What does javascript null mean?

The null value is a unique value representing no value or no object. It implies no object,or null string,no valid boolean value,no number and no array object. In JavaScript, null is a special value that represents the intentional absence of any object value. It’s a primitive value. When a variable is assigned null, it means … Read more

How to comment javascript code?

Use // for line comments and /* some code here */ for block comments Name the numeric constants representing max,min values Number.MAX_VALUE Number.MIN_VALUE In JavaScript, you can comment code in two main ways: Single-line comments: These are created using two forward slashes //. Anything written after // on the same line is considered a comment … Read more

How to hide javascript code from old browsers that dont run it?

Use the below specified style of comments <script language=javascript> <!–javascript code goes here–> Or Use the <NOSCRIPT>some html code </NOSCRIPT> tags and code the display html statements between these and this will appear on the page if the browser does not support javascript. To hide JavaScript code from old browsers that don’t run it, you … Read more

What is a prompt box?

A prompt box allows the user to enter input by providing a text box. In web development, a prompt box is a dialog box that pops up on a webpage to prompt the user to input some information. It typically contains a message, an input field for the user to enter their response, and buttons … Read more

What is the difference between an alert box and a confirmation box?

An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel. In web development, both alert boxes and confirmation boxes are ways to interact with users via pop-up dialog boxes, but they serve different purposes: Alert Box: An alert box is used to … Read more