-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp2.js
34 lines (28 loc) · 1020 Bytes
/
app2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//GLOBALS - No window!!!
//__dirname - path to current directory
//__filename - file name
//require - function to use modules (CommonJS)
//module - info about current module (file)
//process - info about environment where the program is being executed
//npm - global command , comes with node
// npm --version
//local dependency - use it only in this particular project
//npm i <packageName>
//global dependency - use it any project
// npm install -g <packageName>
//sudo install -g <packageName> (mac)
// package.json - manifest file(stores important info about project/package)
//manual approach (create package.json in the root, create properties etc)
//npm unit (step by step , press Enter to skip)
//npm unit -y (everything default)
//1st
// a basic program
// console.log(__dirname);
// setInterval(() => {
// console.log("Hello World");
// }, 1000);
// MAIN CODE STARTS HERE
const _ = require("lodash");
const items = [1, [2, [3, [4]]]];
const newItems = _.flattenDeep(items);
console.log(newItems);