Truthy Values:
"0"
"false"
empty functions
empty arrays
empty objects
typeof(null)
these above listed items are considered true in javascript
Falsy values:
false
0
""
null
undefined
NaN(Not a number)
These are considered false.
When dealing with these truthy and falsy values we should be careful and always try to use "===" or "!==" when we need to compare .
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
An abstract class cannot be a sealed class because the sealed modifier prevents a class from being inherited and the abstract modifier requi...
-
"Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/narendravenkata/React-Demo.git HE...
-
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
No comments:
Post a Comment