Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day April 11, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    What will the following program print to the console?

    function main() {
        printOutput(15);
    }
    
    function printOutput(num) {
        if (num > 10) {
            console.log("This number is greater than 10");
        } 
        if (num < 20) {
            console.log("This number is less than 20");
        } else {
            console.log("This number is odd");
        }
    }
    
    main();
    JavaScript