V Vy Bùi New member Sep 19, 2021 #1 What will be the output of the following JavaScript code? Code: function myFunction() { var x = 10 / "H"; document.getElementById("demo").innerHTML = Boolean(x); } A. True B. False C. Error D. Undefined
What will be the output of the following JavaScript code? Code: function myFunction() { var x = 10 / "H"; document.getElementById("demo").innerHTML = Boolean(x); } A. True B. False C. Error D. Undefined
N Nguyễn Thị Thảo Sương New member Sep 19, 2021 #2 Answer: b Explanation: The value return by the boolean method depends on the input passed to it. The NaN value when passed to the boolean function returns false. Upvote 0 Downvote
Answer: b Explanation: The value return by the boolean method depends on the input passed to it. The NaN value when passed to the boolean function returns false.