Mktime в JS
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
Comfortable Capuchin
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
let map = new Map()
map['bla'] = 'blaa'
map['bla2'] = 'blaaa2'
console.log(map) // Map { bla: 'blaa', bla2: 'blaaa2' }
const numbers = [1, 2, 3, 4, 5];
const bigNumbers = numbers.map(number => {
return number * 10;
});
let new_array = arr.map(function callback( currentValue[, index[, array]]) {
// return element for new_array
}[, thisArg])
//map() methods returns a new array
const data = {name: "laptop", brands: ["dell", "acer", "asus"]}
let inside_data = data.brands.map((i) => {
console.log(i); //dell acer asus
});
var number = [1, 2 , 3, 4, 5, 6, 7, 8, 9];
var doubles = number.map((n) => { return n*2 })
/* doubles
(9) [2, 4, 6, 8, 10, 12, 14, 16, 18] */