// Practice Set · JS Data Types · guest

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

Question 1 of 5 from: JS Primitive Data

What does this log?

const s = new String("hi");
console.log(typeof s, s === "hi", typeof String(42));
Question 2 of 5 from: JS Object Types

What does this log?

const user = { name: "Ava", tags: ["js"] };
const copy = { ...user };
copy.name = "Zed";
copy.tags.push("css");
console.log(user.name, user.tags);
Question 3 of 5 from: JS Object Types

new Math() works and creates a new math object, just like new Date() creates a new date.

Question 4 of 5 from: JS typeof

What does this log?

console.log(typeof mystery);
try {
  console.log(mystery);
} catch (e) {
  console.log(e.name);
}
Question 5 of 5 from: JS undefined

What does this log?

function greet(name = "friend") {
  return "Hi, " + name;
}
console.log(greet(), greet(undefined), greet(null));
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.