Top 15 Questions and Answer in JavaScript

Today I expend basic JavaScript Question . JavaScript is a programming language that conform to the ECMAScript specification. JavaScript is a high-level Language , often just in time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class function.

1 . What is the difference between double equal(==) and triple equal(===)?
*
JavaScript provide both strict and type converting check double equal(==) comparison.
* triple equal(===) check characters , type , value , Boolean .
*
triple equals (===) in JS, we are testing for strict equality.

2. JavaScript Truthy vs falsey value ?
Truthy value :
*
a string containing a single zero ( ‘0 ’)
* string containing the text “false”
* empty array ( [] )
* empty object ( {} )
* empty function ( function(){} )

Falsey Value :
*
false
* 0 (zero)
* “” (empty string)
* null
* undefined
* NaN

3. what is a callback function ?
A callback function is a function passed into another function as an argument. let take a simple example of how to use callback function.

4. What is undefined property ?
the undefined property indicates that a variable has not been assigned a value or nor declared at all . the type of undefined value id undefined too.

5. what is null value ?
The value null represents the intentional absence of any object value.it is one of JavaScript primitive value . the type of null value is object .

--

--

Sonjoy Chandra Barman

I am excited to continue my career as a full-stack developer and am always looking for new challenges and opportunities to grow and learn.