CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #49

Coercion in Mixed Expressions

hardCasting

📄 Code

Read carefully — what does this print?
1console.log(true + true);
2console.log("5" - 2);
3console.log("5" + 2);
4console.log(10 + 20 + "px");
5console.log("$" + 10 + 20);

🎯 Your Answer