You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
622 B
18 lines
622 B
// Declaring different variables of different data types
|
|
let firstName = "Ashu"; // first name of a person
|
|
let lastName = "Baghel"; // last name of a person
|
|
let country = "India"; // country
|
|
let city = "Agra"; // capital city
|
|
let age = 21; // age in years
|
|
let isMarried = false;
|
|
|
|
// Declaring variables with number values
|
|
const gravity = 9.81; // earth gravity in m/s2
|
|
const boilingPoint = 100; // water boiling point, temperature in oC
|
|
const PI = 3.14; // geometrical constant
|
|
|
|
// Variables can also be declaring in one line separated by comma
|
|
let name = "Ashu", //name of a person
|
|
job = "teacher",
|
|
live = "India";
|