Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day Jan. 9, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following program asks a user for input before executing the printAffirmations function.

    function main() {
        let count = readInt("How many? ");
        printAffirmations();
    }
    
    function printAffirmations(count) {
        for (let i = 0; i < count; i++) {
            console.log("Nothing is impossible.");
        }
    }
    
    main();
    JavaScript

    If the user enters 4, what will be printed to the console?