Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
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; }
What operator would you use to replace the underscore on line 3 to complete the program?
+
-
/
%