Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day March 25, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following program wants to check if a number is prime or not:

    function isPrime(x) {
        for (let i = 2; i < x; i++) {
            if (x _  i == 0) {
                return false;
            }
        }
        return true;
    }
    JavaScript

    What operator would you use to replace the underscore on line 3 to complete the program?