// Practice Set · JS Data Types (Part 2) · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: JS NaN

What does this log?

const x = NaN;
console.log(x === x, x !== x, [NaN].includes(NaN), [NaN].indexOf(NaN));
Question 2 of 5 from: JS toLocaleString()

What does this log?

const text = (1234.5).toLocaleString("en-US");
console.log(typeof text, Number(text), Number(text.replaceAll(",", "")));
Question 3 of 5 from: JS Type Coercion

What does this log?

console.log("5" + 2, "5" - 2, 1 + true, [1, 2] + [3]);
Question 4 of 5 from: JS Type Coercion

What does this log?

console.log(0 || "default", "hi" && "there", null && "x", 0 ?? 5);
Question 5 of 5 from: JS Type Conversion

What does this log?

console.log(Number("  42  "), parseInt("3.99"), parseFloat("3.14abc"), Number([20]), Number([10, 20]));
Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.