value is in javascript

In JavaScript, a value is any piece of data that can be assigned to a variable. There are various types of values in JavaScript. Here are some examples:

index.tsx
// String
let name = "John";

// Number
let age = 26;

// Boolean
let isMarried = false;

// Null
let car = null;

// Undefined
let job;

// Object
let person = {
  name: "John",
  age: 26,
  isMarried: false
};
212 chars
22 lines

Values can be assigned to variables using the assignment operator =. For example:

index.tsx
let firstName = "John";
let lastName = "Doe";
let age = 26;
let isMarried = false;
83 chars
5 lines

Variables can hold different types of values, and the value can also change during the execution of the program.

gistlibby LogSnag