Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day Jan. 30, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    What will be printed to the console when the following program runs:

    function main() {
        let result = sum(mystery(10, 2), mystery(3, 5));
        console.log(result);
    }
    
    function sum(first, second) {
        return first + second;
    }
    
    function mystery(first, second) {
        if (first >= second) {
            return first;
        } else {
            return second;
        }
    }
    
    main();
    JavaScript