JavaScript Built in Object
JavaScript Built in Object
JavaScript Built in Object
We also use
new Date(year, month, day, hours, minutes, seconds, milliseconds)
ex. const d = new Date(2022, 9, 24, 10, 33, 30, 0);
Note: JavaScript counts months from 0 to 11:January = 0.December = 11.
20020116023 WD
When we use string for date also it will return date like
const d = new Date("October 22, 2000 12:12:00");
Math object
Also we have ,
Math.min() and Math.max() can be used to find the lowest or highest value
in a list of arguments.
Math.min(0,22,45,-45,10,55); output is -45
Math.max(0,22,45,-45,10,55); output is 55
String Object
Strings are useful for holding data that can be represented in text form.
Some of the most-used operations on strings are to check their length,
to build and concatenate them using the + and += string operators.
Array Object
An array is a special variable, which can hold more than one value
Creating an Array
const array_name = [item1, item2, ...];
example :- const cars = ["Maruti suzuki", "Volvo", "BMW"];