We often feature ECMAScript proposals that are in their later stages, but how about a brand new one you could get involved with? This one proposes an interesting additional bit of language syntax (`?=`) that returns a
[error, value]
tuple from an assignment.Arthur Fiorette
Please open Telegram to view this post
VIEW IN TELEGRAM
2👍7🤔7❤4🔥2
CHALLENGE
const weakMap = new WeakMap();
const array = [{}, {}];
array.forEach(obj => weakMap.set(obj, obj));
const result = array.map(obj => weakMap.get(obj) === obj);
console.log(result);
2👍8
👍11🤔5❤4🔥1
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const weakMap = new WeakMap();
const obj = {};
(function() {
const internalObj = {};
weakMap.set(internalObj, 'hidden');
obj.ref = internalObj;
})();
delete obj.ref;
const result = weakMap.has(obj.ref);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
2🔥7🤔6👍5❤3
👍1
Sponsored by Bryntum 👮♀️
World Class Web Components
🔥 Google takes its biggest L ever... now a convicted monopolist
Fireship
World Class Web Components
Fireship
Please open Telegram to view this post
VIEW IN TELEGRAM
3🤣6🔥4❤3👍2
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const weakMap = new WeakMap();
const array = [1, 2, 3];
const obj = {};
weakMap.set(obj, array);
const result = weakMap.get(obj).reduce((acc, val) => acc + val);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
👍7
2👍10❤8🔥3
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const weakMap = new WeakMap();
const obj1 = {};
const obj2 = { key: 'value' };
weakMap.set(obj1, obj2);
const result = weakMap.get(obj1).key.split('').reverse().join('');
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
👍8🤔4❤2
3👍12❤6🔥3🤔1
Sponsored by Bryntum 👮♀️
World Class Web Components
👍 Volta 2.0: Install and Run JavaScript Tools Quickly
A long-standing Rust powered tool for installing and switching JavaScript related tools (like Node, TypeScript, Yarn, etc.) … “no matter the package manager, Node runtime, or OS.” GitHub repo.
Volta
World Class Web Components
A long-standing Rust powered tool for installing and switching JavaScript related tools (like Node, TypeScript, Yarn, etc.) … “no matter the package manager, Node runtime, or OS.” GitHub repo.
Volta
Please open Telegram to view this post
VIEW IN TELEGRAM
2👍5❤2🔥2
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const weakMap = new WeakMap();
const objs = [{}, {}, {}];
objs.forEach((obj, index) => weakMap.set(obj, index + 1));
const result = objs.filter(obj => weakMap.has(obj)).map(obj => weakMap.get(obj) * 2);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
2👍6❤3🔥3🤔3
👍6
Sponsored by Bryntum 👮♀️
World Class Web Components
🌲 Node.js Security release process
Only those who have been involved in a security release process know how hard it is (time-consuming, effort).
We've been working hard to automate most (if not all) of the process and the new security release process is live
Rafael Gonzaga
World Class Web Components
Only those who have been involved in a security release process know how hard it is (time-consuming, effort).
We've been working hard to automate most (if not all) of the process and the new security release process is live
Rafael Gonzaga
Please open Telegram to view this post
VIEW IN TELEGRAM
2❤4👍3🔥2
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const obj = {
a: 1,
b: 2
};
let a = 10;
let b = 20;
with (obj) {
a += 1;
b += 1;
}
console.log(a, obj.a, b, obj.b);
Please open Telegram to view this post
VIEW IN TELEGRAM
🤔11👍3❤1
2🔥13👍7🤔4❤3
Sponsored by Bryntum 👮♀️
World Class Web Components
❓ CHALLENGE
World Class Web Components
const obj1 = {
name: "Alice",
age: 25
};
const obj2 = {
age: 30,
city: "Wonderland"
};
with (obj1) {
with (obj2) {
name = "Bob";
console.log(name, age);
}
}
Please open Telegram to view this post
VIEW IN TELEGRAM
🤔9🤩7👍5❤1
2👍14🤔7🔥5❤3