const sentence = 'The quick brown fox jumps over the lazy dog';
const result = sentence.split(/\s+/).map(word => word.length).filter(length => length % 2 === 0);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€3
π21 11β€9
While many of us were taking a break, some folks published an 'everything' package that depended upon all public npm packages, resulting in millions of transitive dependencies. This caused.. some problems. One of the folks involved also shared the story from behind the scenes.
FEROSS ABOUKHADIJEH (SOCKET)
Please open Telegram to view this post
VIEW IN TELEGRAM
const text = 'Hello, World!';
const result = text.match(/l+/g);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π26 12π€10β€2
While Node has always been fast (thanks largely to its V8 underpinnings), thereβs a renewed focus on performance in the face of benchmarks and claims from alternatives like Deno and Bun. Lars looks at the ecosystem of benchmarking options in the space.
LARS KAPPERT
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π4 3
If you want a look at the output without running it for yourself, thereβs a whole page of graphs for popular, real world projects including Chalk and Yarn. Might be an option if you're looking to create a fun poster for your office wall..? π
SANDER VERWEIJ
Please open Telegram to view this post
VIEW IN TELEGRAM
π7 6β€3
const a = [1, 2, 3];
const b = a;
b[0] = 0;
console.log(a);
Please open Telegram to view this post
VIEW IN TELEGRAM
π21π€£14 12π€6
What is the output?
Anonymous Quiz
39%
[1, 2, 3]
52%
[0, 2, 3]
6%
[0, 2, 3, 1]
3%
[0, 2, 3, 1, 2, 3]
π€18β€9π9π€£7 6π€©1
Anyone who follows Devon Govett (also of Parcel fame) on social media will know just how much he's put into this suite of components, and v1.0 is now here. If youβre building your own components and want to get accessibility right, this is for you. Devon explains a little more here.
ADOBE
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6 4π3
async function asyncQuiz() {
console.log("Start");
const promise1 = new Promise((resolve) => {
setTimeout(() => resolve("Promise 1"), 1000);
});
const promise2 = new Promise((resolve) => {
setTimeout(() => resolve("Promise 2"), 500);
});
console.log(await promise1);
console.log(await promise2);
console.log("End");
}
asyncQuiz();
Please open Telegram to view this post
VIEW IN TELEGRAM
π€13π12 9β€8
What is the output?
Anonymous Quiz
45%
Start, Promise 1, Promise 2, End
36%
Start, Promise 2, Promise 1, End
10%
Start, Promise 1, End, Promise 2
9%
Start, Promise 2, End, Promise 1
π€20 10π9π€©2β€1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€15π€£9β€5π4
function* gen() {
yield *[1,1];
yield 2;
yield 3;
}
const generator = gen();
console.log(generator.next().value);
console.log(generator.next().value);
for (const value of generator) {
console.log(value);
}
Please open Telegram to view this post
VIEW IN TELEGRAM
π14 7π€4β€3
π11 7β€2π€©1
Who doesnβt love a good front-end tool? In this roundup, youβll find useful front-end tools that were popular last year and will help you speed up your development workflow. Letβs dive in!
Louis
Please open Telegram to view this post
VIEW IN TELEGRAM
π12β€7 5π€©3
function getArr() {
return Array.from(arguments);
}
const result = getArr(...[1, 2, 3]);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π1
StringZilla v3 is starting to look serious! Crushing C++ standard library by 3-20x is one thing... But superseding LibC implementations and potentially bringing them to other programming languages is what will make this library truly specialπ₯
Any Rust and JS developers with C experience willing to implement the wrappers?
Ash Vardanian
Any Rust and JS developers with C experience willing to implement the wrappers?
Ash Vardanian
CHALLENGE
const string = 'a1b2c3d4e5';
const result = string.match(/\d+/g).map(Number);
console.log(result);
What is the output?
Anonymous Quiz
47%
[1, 2, 3, 4, 5]
28%
['1', '2', '3', '4', '5']
8%
[1, '2', 3, '4', 5]
18%
This will result in an error.
π14 4β€3