Null:
The Null is used to represent an intentional absence of value. It represents a variable whose value is undefined. It accepts only one value, which is null. The Null keyword is used to define the Null type in TypeScript, but it is not useful because we can only assign a null value to it.
var myVar = null;console.log(myVar);// null
Undefined:
It is very important to know about undefined coding in JavaScript. There are many ways to get undefined described below.
let…
React is one of the top JavaScript libraries in the context of frontend development for building the user interface, maintained by Facebook.
React is used for building single-page applications or mobile applications.
Today I am going to discuss some random React topics, those are beginner-friendly. This list I made is only my preference.
DOM:
Firstly, DOM stands for the document object model and it’s a standardized programming interface where the whole HTML document is represented as a tree-structured. Each node on the tree represents an HTML element on that document.
What is a virtual DOM?
In a simple…
1 try…catch
Sometimes our scripts have errors, no matter how experts we are in programming. The syntax try…catch
that allows us to catch errors. The try…catch syntax has two main blocks, try
and catch
. Our code will appear in try {…}
. And if any error occurs, then the try execution is stopped, and control flows to the beginning of catch(err)
.
try {
// code...
}
catch(err){
// error handling
}
But one thing, this syntax will work only for runtime, and the code must be runnable.
We declare variables with var
, let
, const
. But there is a thing called block-scope…
This method will let you convert uppercase letters to a capital letter. Like, “ Have a good day.” toUpperCase()
the method will convert it to: “HAVE A GOOD DAY.” It converts all lower case letters in array to upper case. This function has a cousin called toLowercase()
. This method can change uppercase letters to lowercase. Like, “have a good day.”
var wish = “I’ll buy you a car.”;console.log(wish.toUpperCase()) // I'LL BUY YOU A CAR.
console.log(wish.toLowercase()) // i'll buy you a car.
2. concat()
Theconcat()
method connects two string arguments and provides another string. …
Full stack web developer || Experienced with JavaScript , React js, ES6, Node js, Express, Mongo DB,