01. Difference between == & ===?

Ans: Double equal (==) will only check value is equal or not and triple equal will check value and data type

Example:

let first= 2;

let second=’2’;

if(first==second){

console.log(‘Condition true’)

else{

console.log(‘condition false’)

result: condition true, if we put triple equal instead of double equal, the result will be false

02. What is closer in JavaScript?

Ans: If we return a function from a function. It creates a close environment. It’s called closer .

Example:

function stopwatch(){

const count=0;

return function(){

count++;

};

};

03. What is setTimeout in JavaScript?

Ans: setTimeout work in…


01. React is a library, not a framework

Unfortunately, react js is not a framework. It cannot provide you a complete solution for your projects. You have to use another library with react. On the other hand, the framework is a complete solution. It will give you a structure to complete a project. However, there are disadvantages also for example we can say that frameworks are not flexible. Frameworks are usually large and full of features if you want to use a small part of them then you have to implement the whole.

02. React JSX

If you see react…


01. Title: Checking value type of JavaScript

Description: we can easily identify which type of value by using type of. Such as value like string, number, Boolean, object, function

Example:

console.log(typeof(2)); // “number”

console.log(typeof(“hello”)); // “string”

console.log(typeof(undefined)); // “undefined”

console.log(typeof({})); // “object”

console.log(typeof([])); // “object”

console.log(typeof(x => x * 2)); // “function”

02. Title: Error Handling with try and catch

Description: The try…catch mainly two blocks, first try then catch:

try {

// code…

} catch (err) {

// error handling

}

How try and catch works:

1. First, try {…} will execute.

2. If no error found then catch…


01. Title: How to find Text and text position with JavaScript

Description:

We can find text through JavaScript with its string method called String.Includes(). This method returns Boolean (true and false). And its case sensitive.

Example:

const fullText = ‘Welcome to programming hero’;

const text = ‘hero’;

console.log(`word “${text}” ${fullText.includes(text) ? ‘is’ : ‘is not’} in the sentence`);

// expected output: “word “hero” is in the sentence”

Syntax for includes()

includes(searchString)

includes(searchString, position)

02. Title: How to search Text and text position with JavaScript

Description:

We can find text through JavaScript with its string method called String.indexOf().

MD.Rashaduzamman Rian

Full Stack Developer (MERN)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store