Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day April 14, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following program is meant to print the total value of a trade, but currently results in an error:

    function main() {
        let price = 8;
        let count = 30;
    
        printValue(count);
    }
    
    function printValue(num) {
        let value = unitPrice * num;
        console.log(value);
    }
    JavaScript

    Which of the below options should be implemented in order to fix the program?