double equals(==) vs triple equals(===)
The triple equal(===) operator will compare both the value and type of the operands. If the value is the same but the type is not, the equality will evaluate to false. On the other hand the double equal(==) checks the value only.
console.log(2 === "2") // will evaluate to 'false' as the left operand is of type 'number' while right operand is of type 'string'console.log(2 == "2") // will evaluate to 'true'
Truthy and Falsy values
The heart of all react applications are components. A component is essentially a piece of the user interface. When building applications with react we build a group of independent and reusable components and combine them to build complex user interfaces.
Every react application has at…
In the case of loops or conditionals where curly braces are used, we should use the the opening brace on the same line as the corresponding keyword. Its not ideal to use it on the next line. The finishing brace should be used on the line after next line. There should also be a white space before opening brace
Its very disturbing to read a lengthy line. So at a reasonable position we should split them. …
Stringobject is used to represent and manipulate a sequence of characters.
This method counts all the characters of a string (including white space)
includes() is a case sensitive function…