Posts in Category: javascript

Get working directory name and file name in Node

__dirname : full directory path __filename: exact file location Node provides two variables named “__dirname” and “__filename” who returns the directory path of the currently executing file and the exact location of the file respectively. Both of them return string. To know in depth go through the following. Get working directory path We can

Read More

Node environment vs Browser environment

Node and web browsers, both executes JavaScript, but Node does that in server side and browsers in client side. Node uses the same JavaScript engine which is the backbone of Chrome, but still we can find few differences between Node and Browser. Node Browser  Node doesn’t have a predefined “window” object cause it

Read More