Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Running JavaScript on Your Computer | Section
Практика
Проекти
Вікторини та виклики
Вікторини
Виклики
/
JavaScript Essentials for Backend

bookRunning JavaScript on Your Computer

Свайпніть щоб показати меню

So far, JavaScript might feel like something that only works inside a browser. But for backend development, we run JavaScript directly on a computer.

This is possible because of Node.js.

Node.js is an environment that allows JavaScript to run outside the browser. It lets you execute JavaScript files, work with data, and build backend logic.

To get started, you need to install Node.js on your computer. You can download it from the official website and follow the installation steps for your system.

After installation, you can check if everything works by opening the terminal and running:

node -v

If you see a version number, Node.js is ready to use.

Now you can run JavaScript files locally. Create a file with a .js extension, for example:

app.js

Inside that file, write:

console.log("Hello, world");

Then run the file using Node.js. The code executes, and the result appears in the terminal.

The console.log function is used to output information. It is the simplest way to see what your code is doing.

question mark

What should you do to run JavaScript files on your computer?

Виберіть правильну відповідь

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Секція 1. Розділ 2
some-alt