Skip to content
Justice Tech School

os Module

os gives system info: platform, cpus, memory and the temp folder.

Example
const os = require("os");
console.log(typeof os.platform(), os.cpus().length > 0, os.totalmem() > 0);
console.log(typeof os.tmpdir(), os.EOL === "\n");

Result

string true true
string true

Exercise

Temp folder.

os.()

Quiz Test

What does os.EOL give?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.