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
Post #1891
7.52K

- π₯ 8
- β€ 1
- π 1
JA @javascript
Showing posts older than #1892 Β· Back to latest

(async function() {
return await 10;
})().then(console.log);

const nums = [1, 2, 3];
const res = nums.reduce((acc, val) => acc + val, "");
console.log(typeof res);
function* gen() {
yield 1;
yield 2;
return 3;
}
const g = gen();
console.log([...g]);
const obj = {
a: 1,
b: function() {
return this.a;
}
};
const b = obj.b;
console.log(b());

console.log(0.1 + 0.2 === 0.3);

const obj = { a: 1 };
Object.seal(obj);
obj.b = 2;
console.log(obj.b);