runtime envrionment in js

Yoseob Shin·2022년 4월 19일
0

javascript

목록 보기
17/24
post-thumbnail
post-custom-banner

A runtime environment is where your program will be executed. JavaScript code may be executed in one of two runtime environments:

  1. a browser’s runtime environment
  2. the Node runtime environment

In each of these environments, different data values and functions are available, via global objects and these differences help distinguish front-end applications from back-end applications.

  • Front-end JavaScript applications are executed in a browser’s runtime environment and have access to the window object.
  • Back-end JavaScript applications are executed in the Node runtime environment and have access to the file system, databases, and networks attached to the server.

tip: process is an object containing data relating to the JavaScript file being executed. process.env is an object containing environment variables such as process.env.PWD which contains the current working directory (and stands for “Print Working Directory”).

profile
coder for web development + noodler at programming synthesizers for sound design as hobbyist.
post-custom-banner

0개의 댓글