Javascript

Q1. What is JavaScript?
A: JavaScript is a client side scripting language, that can be inserted into HTML pages and is understood by web browsers.

Q2. What is ‘this’ keyword?
A: ‘This’ keyword is used to point at the current object in code.

Q3: Which symbol is used for comments in Javascript?
A: For Single line comments => //
For multi line comments => /* test */

Q4: What is the use of === operator?
A: === is called as strict equality operator, which returns true when two operands are having same value without any type conversion.

Q5: What is the use of isNaN function?
A: isNan function returns true if the argument is not a number otherwise it is false.

Q6: Explain how can you submit a form using JavaScript?
A: To submit a form using JavaScript use document.form[0].submit();

Leave a Reply

Your email address will not be published. Required fields are marked *