JavaScript
31.9K subscribers
1.01K photos
9 videos
33 files
697 links
A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript πŸš€ Don't miss our Quizzes!

Let's chat: @nairihar
Download Telegram
πŸ‘‘ Cronicle: Cron with a Web Front End

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(','));
What is the output?
Anonymous Quiz
12%
0,2,4
57%
0,4,8 0,4,8
19%
2,4,6
11%
0,4,8
❀1πŸ‘1πŸ”₯1
😈 Sam Rose has put together a fantastic illustrated introduction to Big O notation, along with JavaScript examples. If you've ever wondered what O(1), O(log n), etc. mean, this is a great primer.
Please open Telegram to view this post
VIEW IN TELEGRAM
❀5πŸ‘1πŸ”₯1