CHALLENGE β
Promise.resolve(1)
.then(value => {
console.log(value);
throw new Error('Something went wrong');
})
.then(() => {
console.log('This will not run');
})
.catch(error => {
console.log('Caught:', error.message);
return 42;
})
.then(value => {
console.log('Recovered with:', value);
});
Please open Telegram to view this post
VIEW IN TELEGRAM
π3π€2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£64π9β€4π€1π€©1
CHALLENGE β
const sym = Symbol('unique');
const obj = {
[sym]: 'Secret',
public: 'Visible'
};
console.log(Object.keys(obj));
console.log(obj[Symbol('unique')]);
Please open Telegram to view this post
VIEW IN TELEGRAM
π2
What is the output?
Anonymous Quiz
31%
[βpublicβ, Symbol(βuniqueβ)], Secret
34%
[βpublicβ, Symbol(βuniqueβ)], undefined
23%
[βpublicβ], undefined
13%
[βpublicβ], Secret
π₯8π3
npx is-my-node-vulnerable
A tool created and maintained by the Node.js security team. This utility allows you to quickly check for known vulnerabilities and helps safeguard your projects.
Please open Telegram to view this post
VIEW IN TELEGRAM
π13β€6π₯6π€©2
CHALLENGE
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}
β€4π3
π€25π14π€©6π₯5π€£2
Please open Telegram to view this post
VIEW IN TELEGRAM
π7π₯2β€1
CHALLENGE
function Person(name) {
this.name = name;
}
Person.prototype.greet = function () {
console.log(`Hello, ${this.name}`);
};
const person = new Person('Alice');
person.greet();
console.log(person.hasOwnProperty('greet'));
π7
What is the output?
Anonymous Quiz
46%
Hello, Alice; true
33%
Hello, Alice; false
10%
Error
11%
Hello, Alice; undefined
π18π€8π₯2
Say hello to the newest release line of Node.js that gets all the cutting edge features first (Node 22 will soon become the active LTS release). v23 notably enables support for loading ES modules with
require()
by default, drops 32-bit Windows support, and node --run
goes stable.Rafael Gonzaga
Please open Telegram to view this post
VIEW IN TELEGRAM
β€10π4π₯3
What is the output?
Anonymous Quiz
18%
"number", true
22%
"undefined", false
30%
"number", false
30%
"NaN", true
π€£30π7β€3π₯1
CHALLENGE
async function test() {
console.log(1);
await new Promise(resolve => setTimeout(resolve, 1000));
console.log(2);
return 3;
}
console.log(4);
test().then(console.log);
console.log(5);
π3π₯1
What is the output?
Anonymous Quiz
43%
4, 1, 5, 2, 3
31%
4, 1, 2, 5, 3
21%
1, 4, 2, 3, 5
5%
1, 4, 2, 5, 3
π13π₯5π€£4β€3
A two hour walkthrough of using the Kaplay game library (formerly known as Kaboom.js) to build a complete, if simple, Sonic-branded game. You can also play it here.
JSLegendDev
Please open Telegram to view this post
VIEW IN TELEGRAM
1π10β€3π₯3
CHALLENGE
function Animal(name) {
this.name = name;
}
Animal.prototype.sound = 'Generic sound';
const dog = new Animal('Dog');
Animal.prototype.sound = 'Bark';
console.log(dog.sound);
π3
π€£14π10β€4π€©2
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯12π4β€1