// 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 toString()

What does this log?

try {
  null.toString();
} catch (e) {
  console.log(e.name);
}
console.log(String(undefined) + "!");
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 Conversion

What does this log?

console.log(Number("  42  "), parseInt("3.99"), parseFloat("3.14abc"), Number([20]), Number([10, 20]));
Question 4 of 5 from: JS Type Conversion

+new Date() gives the same number as new Date().getTime(): the milliseconds since January 1, 1970 (UTC).

Question 5 of 5 from: JS Destructuring

What does this log?

const person = { firstName: "John", lastName: "Doe", age: 50 };
const { lastName: surname, age, country = "US", ...others } = person;
console.log(surname, age, country, others);
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.