Joyee writes about landing experimental support for require()-ing synchronous ES modules in Node, a feature that has been a long time coming, due to both technical and cultural factors.
JOYEE CHEUNG
Please open Telegram to view this post
VIEW IN TELEGRAM
console.log(new RegExp({}).test("mom"));
console.log(new RegExp({}).test("dad"));
By Samvel
Please open Telegram to view this post
VIEW IN TELEGRAM
π€26β€10 6π4
π€34π€£16 6β€4π4
Several developers have come together to build this convenient way to visualize the compatibility of different Web APIs and JavaScript features across the ever increasing number of different runtimes (e.g. Bun, Deno, Node, LLRT..)
TOM LIENARD ET AL.
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π5 4
CHALLENGE β
let arr = [1, 2, 3];
function modifyArray(array) {
array.push(4);
}
modifyArray(arr.splice(1));
console.log(arr);
Please open Telegram to view this post
VIEW IN TELEGRAM
π€31 28π14π€£4
A small library for beautiful drawing and handwriting on canvas elements. Itβs been around for several years but v4.0 is almost a complete rewrite. GitHub repo.
JAKUB FIALA
Please open Telegram to view this post
VIEW IN TELEGRAM
π5 2β€1
CHALLENGE β
let x = 5;
let result = typeof (x + "10");
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€3
β€22π9π€9π€©2 1
Zach Wilson
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£87 5π€3π€©2
function foo() {
let a = b = 0
a++
return a
}
foo()
console.log(typeof a)
console.log(typeof b)
Please open Telegram to view this post
VIEW IN TELEGRAM
π€22π8β€2
What is the output?
Anonymous Quiz
21%
undefined, number
27%
undefined, undefined
39%
number, number
13%
number undefined
π24 7β€2π€2
const obj = {
a: 1,
b: function() {
console.log(this.a);
}
};
const func = obj.b;
func();
Please open Telegram to view this post
VIEW IN TELEGRAM
β€10π6 1
What is the output?
Anonymous Quiz
52%
1
26%
undefined
14%
TypeError: Cannot read property 'a' of undefined
7%
ReferenceError: a is not defined
π€33π15 10β€1π€©1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£98π€17β€6 3
function* generator() {
yield 1;
yield 2;
yield 3;
}
const gen = generator();
console.log(gen.next().value);
console.log(gen.next().value);
Please open Telegram to view this post
VIEW IN TELEGRAM
π3β€2
π€22π12β€7 4
In an ES module, instead of using __dirname or __filename, you can now use import.iss.oneta.dirname and import.iss.oneta.filename (this came with Node 20.11.0 (LTS) released in January).
PHIL NASH
Please open Telegram to view this post
VIEW IN TELEGRAM
π9 4β€2
const a = { a: 1 };
const b = Object.assign({}, a);
b.a = 2;
console.log(a.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
28%
2
44%
1
15%
undefined
13%
TypeError: Cannot set property 'a' of undefined
π€£20π€13π11β€7 7