Guest practice: this set is not saved and does not count.
What does this log?
try { null.toString(); } catch (e) { console.log(e.name); } console.log(String(undefined) + "!");
undefined!
TypeError
null
!
const text = (1234.5).toLocaleString("en-US"); console.log(typeof text, Number(text), Number(text.replaceAll(",", "")));
console.log(Number(" 42 "), parseInt("3.99"), parseFloat("3.14abc"), Number([20]), Number([10, 20]));
NaN
+new Date() gives the same number as new Date().getTime(): the milliseconds since January 1, 1970 (UTC).
+new Date()
new Date().getTime()
const person = { firstName: "John", lastName: "Doe", age: 50 }; const { lastName: surname, age, country = "US", ...others } = person; console.log(surname, age, country, others);
lastName
undefined
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.
Check my answers