Skip to content
Justice Tech School

Variables and Types

Node runs JavaScript. Use const and let, and typeof to check types.

Example
const name = "Ada";
let n = 5;
n += 1;
console.log(name, n, typeof name, typeof n, typeof null, typeof undefined);

Result

Ada 6 string number object undefined

Exercise

Constant.

 x = 1;

Quiz Test

What is typeof null?

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