-
Notifications
You must be signed in to change notification settings - Fork 0
/
0_intro.js
31 lines (24 loc) · 1 KB
/
0_intro.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
// Machine Code > Assembly Language > Standard Language (i.e. C++, Java) > NodeJS
// NodeJS is written in C++ just like the V8 Engine
const path = require("path")
/**
* Features, Other than javascript :
* 1. read and write files on computer
* 2. connect to database
* 3. Act as a server for content
*
*
* Note: Since node run outside the browser, So we lose some JS features like `document Object Model` and can't interact with dom element any more
*/
// console.log(global, "-------------")
// console.log(globalThis)
// document ref: https://nodejs.org/api/documentation.html
// Math.floor()
console.log(__dirname, "-------------") // return upto current folder name
console.log(__filename) // return upto current file name along with folder
console.log(path.basename(__dirname), "-------------") // return only current folder
console.log(path.basename(__filename)) // return only current file name
console.log(process)
/**
* Create a nodeJS folder for `ans-shell` package move into `a1-ui` package
*/