FAQ: Introduction to JavaScript - Data Types

What is the difference between the primitive data type “number” and the Object Number:

If you’re on windows, press the ‘Insert’ key

Check the domain name in the location bar.

@ namibianwolf
these threads are the best, just had this same question and glad to feel like I am not the only one to misunderstand the exercise here

Hi! whats the difference between null and undefined? Can someone give me an example? Thanks!

Images are worth a thousand words:



:rofl: Perfect explanation! Thanks!

Shouldn’t the console.log response from line 1 and line 2 be in different colors, as one is a string, and one is a number?

the first rule of every programmer is to read the syntax.
The syntax for strings in JS says you must use the quotation marks when the data type is strings. This helps Javascript to differentiate between strings and other data types, eg Num.

let x = 5 + 5; //outputs 10
let y = “5 + 5”; //outputs 5+5

this way, you can have the option to print out the second variable (y=5+5) if you want individual numbers to be printed and you don’t want to sum it unlike the first variable.

Is just a way for javascript to interprets what type of data you want

What’s wrong with this picture?

There are 8 data types listed, and it’s unclear as to whether Symbol is a fundamental datatype consequently.

1 Like

I came here to ask the exact same question! :laughing:

The answer