diff --git a/2017-03-14/jo-so_euler87_func.js b/2017-03-14/jo-so_euler87_func.js index ab2b7c3..f131ccb 100755 --- a/2017-03-14/jo-so_euler87_func.js +++ b/2017-03-14/jo-so_euler87_func.js @@ -48,7 +48,7 @@ Array.prototype.cross = function (other, op) { // print([1, 2].cross([3, 4], (a, b) => a + b)); let primeNumbers = [2,3,5,7,11,13,17,19]; -let limit = 5e7; +const limit = 5e7; for (let num = primeNumbers[primeNumbers.length - 1] + 2; num <= Math.sqrt(limit); num += 2) { diff --git a/2017-03-14/jo-so_euler87_iterator.js b/2017-03-14/jo-so_euler87_iterator.js index 75a0d3c..ac62135 100755 --- a/2017-03-14/jo-so_euler87_iterator.js +++ b/2017-03-14/jo-so_euler87_iterator.js @@ -74,7 +74,7 @@ let primeNumbers; // print(Array.from(function* () { for (let x of primeNumbers()) { if (x > 50) return; yield x; } }())); -let limit = 5e7; +const limit = 5e7; function* pnPower(exp) { for (let e of primeNumbers()) {