GooseterV / Project-Euler

Avoid use of == and != JS-0050
Anti-pattern
Minor
a year agoa year old
Expected '===' and instead saw '=='
 3	 
 4	let p,i;
 5	for (p = 2; p * p < MAX_SIZE;p++) {
 6		if (IsPrime[p] == true) { 7			for(i = p * p; i < MAX_SIZE; i += p)
 8				IsPrime[i] = false;
 9		}
Expected '!==' and instead saw '!='
 1function gcd(a, b) {
 2	while (b != 0) { 3		c = a % b;
 4		a = b;
 5		b = c;
Expected '===' and instead saw '=='
 1function smallestFactor(x) {
 2	for (i = 2; i <= Math.floor(x**.5); i++) {
 3		if (x % i == 0) { 4			return i;
 5		};
 6	};