← Back to Question List
JavaScript Code Walkthrough #17
Truthy and Falsy in if
📄 Code
Read carefully — what does this print?1let count = 0;2if (count) {3 console.log("has count");4} else {5 console.log("no count");6}7let name = "Joe";8if (name) {9 console.log("has name");10}