This means that no matter where functions and variables are declared, they are moved to the top whether their scope is global or local.
Execution context hoisted variable decaleration only:
console.log(name); // Output: undefined
var name = ‘John Due.’;
Execution context hoisted function…
What is React
React is a declarative and components based library. React has two types of components one of class based and another one is function…
This blog is easily explained with an example and just a simple introduction on this topic. If someone earns more interest they can look for a more brief solution.
Data Types / Value Types:
const num = 5;
const name = “John”;
Note: all data types…
Convert String to Number:
We know basically when we need a string type number to convert to a number type then use parseInt(), parseFloat() function to convert it. But we can do this task with a small trick by using the unary (+) operator.
const typeString = ‘5’;
const typeNumber = + typeString; // +’5'
//typeString = ‘5’ will be equal to typeNumber = 5;
// just use unary + operator as prefix any of situation
don’t use unary (+) operator when string is not a number format like
const stringValue = ‘10xyz’;
const numberValue = +’stringValue’; //NaN
I am a hard working individual web developer with deep knowledge and proficiency in front-end technology