Describing itself as βa fancy cron replacementβ, Cronicle is a distributed task scheduler and runner, built around a Node app with a web based UI. GitHub repo.
Joseph Huckaby
Please open Telegram to view this post
VIEW IN TELEGRAM
π5β€3π₯1
CHALLENGE
const arr = new Array(1000000).fill(0).map((_, i) => i);
const results = [];
function method1() {
return arr.filter(x => x % 2 === 0).map(x => x * 2).slice(0, 3);
}
function method2() {
const result = [];
for (let i = 0; i < arr.length && result.length < 3; i++) {
if (arr[i] % 2 === 0) {
result.push(arr[i] * 2);
}
}
return result;
}
console.log(method1().join(','));
console.log(method2().join(','));
β€1π1π₯1
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π1π₯1