Node - Js Is An Open Source Server en
Node - Js Is An Open Source Server en
Boolean
Undefined
Null
String
Number
Loose Typing: Node.js supports loose typing, which means you don’t need to specify
what type of information will be stored in a variable in advance. We use the var
and let keywords in Node.js declare any type of variable. Examples are given below:
Example:
number
string
boolean
undefined
Objects & Functions: Node.js objects are the same as JavaScript objects i.e. the
objects are similar to variables and it contains many values which are written as
name: value pairs. Name and value are separated by a colon and every pair is
separated by a comma.
Example:
let company = {
Name: "GeeksforGeeks",
Address: "Noida",
Contact: "+919876543210",
Email: "abc@geeksforgeeks.org"
};
Example:
// Declare variable
let x = 2;
let y = 3;
Multiplication of 2 and 3 is 6
As you observe in the above example, we have created a function called “multiply”
with parameters the same as JavaScript.
Example:
console.log(x);
console.log(y);