Truthy and Falsy
Null vs. Undefined
A framework is a complete solution for an application, and Library is a small and lightweight thing that is more flexible. When you are using a framework, you have to use a large file though you don’t need them. In Library, you can choose exactly what you want.
2. Ternary Operator
In react or JSX you can only use an expression. You can not use regular if-statement. But You can use a ternary operator as well. You can only use what returns any value.
x > 10 ? "X is Big" : "X is Small"
Type of Values
Primitive Values are number, string, undefined, etc.
Primitive Values are number, string, undefined null, booleans, symbols, bigInts. We can’t manipulate Primitive Values by our code. We can only use them when we need them.
Non-Primitive values are objects and functions. We can easily see the difference in the browser console. The browser will display them differently from primitive values. We can manipulate Non-Primitive values by our code.
Expressions are like a question, but…
Object Data Types has some sub-category, Function, Array, Date, RegExp.
There are some built-in Error types as well.
A React Developer