JavaScript
32.1K subscribers
1.04K photos
10 videos
33 files
722 links
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
Download Telegram
CHALLENGE

const func = new Function('a', 'b', 'return a + b');
console.log(func(1, 2));
πŸ‘5❀2
What is the output?
Anonymous Quiz
47%
3
19%
undefined
18%
'a+b'
15%
Error
πŸ€”12πŸ‘9❀4
✌️ TC39 Meets Again and Advances Key Proposals

The Ecma TC39 group that pushes forward the development of ECMA/JavaScript met again this week and moved several key proposals forward, including Deferred Import Evaluation, Error.isError(), RegExp escaping, and Promise.try.

Sarah Gooding (Socket)
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ”₯3❀2
CHALLENGE

function* generator() {
yield 1;
yield* [2, 3];
yield 4;
}

const gen = generator();

const arr = Array.from(gen);
console.log(arr);
πŸ‘15❀5
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘2πŸ”₯2
CHALLENGE

const sym1 = Symbol('sym');
const sym2 = Symbol('sym');

const obj = {
[sym1]: 'value1',
[sym2]: 'value2'
};

console.log(obj[sym1], obj[sym2], sym1 === sym2);
πŸ‘5❀3
❀20πŸ‘8πŸ€”2
❓ DGM.js: Infinite Canvas Library with Smart Shapes

A library for rendering and working with infinitely pannable canvases that contain β€˜smart shapes’ that you can script and give various constraints and properties. GPLv3 licensed.

Minkyu Lee
Please open Telegram to view this post
VIEW IN TELEGRAM
❀2πŸ”₯2πŸ‘1
CHALLENGE

function* generator() {
yield 1;
yield 2;
yield 3;
}

const gen = generator();

const { value, done } = gen.return('early');

console.log(value, done);
πŸ€”7πŸ‘4❀2πŸ”₯1
πŸ‘6πŸ€”2❀1
😎 Bread Jam: Make Variables and Properties Easier to See in VS Code

An interesting new VS Code extension that offers 11 different ways to make variable names stand out more in your editor, with both basic colorization approaches and an interesting emoji-based prefix option.

Ting Wei Jing
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯3❀1πŸ‘1
CHALLENGE

const sym = Symbol('unique');
const obj = {
[sym]: 'symbol value',
a: 1,
b: 2
};

const keys = Object.keys(obj);
const symbols = Object.getOwnPropertySymbols(obj);

console.log(keys.length, symbols.length);
πŸ‘10❀1
What is the output?
Anonymous Quiz
41%
2, 1
35%
3, 1
15%
2, 0
9%
3, 0
πŸ‘8❀2πŸ”₯1πŸ€”1
πŸ”΅ How to Learn and Read effectively

You read a book and enthusiastically highlighted every sentence. But let’s be honest, how often have you actually gone back to review those highlights? Probably not very often, if at all.

Hovhannes Dallakyan
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘11❀5πŸ”₯2
CHALLENGE

const obj = {
value: 1,
method() {
return this.value;
}
};

const boundMethod = obj.method.bind({ value: 2 });
console.log(boundMethod());
πŸ‘9
What is the output?
Anonymous Quiz
17%
undefined
16%
Error
56%
2
11%
1
πŸ‘10❀6πŸ€”5
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4πŸ‘4πŸ”₯2
CHALLENGE

const obj1 = { a: 1 };
const obj2 = { b: 2 };
Object.setPrototypeOf(obj2, obj1);

console.log('a' in obj2);
console.log(obj2.hasOwnProperty('a'));
console.log(obj2.__proto__.a);
πŸ‘5
πŸ‘8❀3πŸ”₯2