Sign in

Photo by Hope House Press - Leather Diary Studio on Unsplash

Truthy and Falsy

There are some values in JavaScript that represent Truthy, and some represent falsy.

Truthy Values

Falsy Value

Null vs. Undefined

Null and Undefined are primitive values in JavaScript. Both are almost the same but there is a minor difference between them. Undefined value comes automatically, but the Null value never comes automatically. If you don’t set the value of a variable, you will find an Undefined…

  1. Framework VS Library

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

A variable store values. There are two categories of values in JavaScript; they are Primitive Value, Objects and Functions.

Primitive Values are number, string, undefined, etc.

Primitive Value

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

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…

Data Types are the building blocks of a programming language. JavaScript also has some data types. They are number, string, boolean, object, and symbol. It also has null and undefined types of data.
Object Data Types has some sub-category, Function, Array, Date, RegExp.
There are some built-in Error types as well.

AR Arzu

A React Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store