CHALLENGE β
function tag(strings, ...values) {
return strings[0] + values[0] * 2 + strings[1] + values[1] + strings[2];
}
const num1 = 5;
const num2 = 10;
const result = tag`Double ${num1} and add ${num2}!`;
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
1π€15π8β€3π₯3
What is the output?
Anonymous Quiz
46%
Double 5 and add 10!
34%
Double 10 and add 10!
7%
Double 10 and add 5!
13%
Double 10 and add 20!
π€9π7
π Tired of bugs and frontend-backend conflicts?
Our expert devs have created a cutting-edge platform just for IT professionals! π
π Join our Telegram channel to access:
πΉ Latest industry news π°
πΉ Practical developer tips π‘
πΉ Exclusive content on our products & projects π
Stay informed about the most relevant tech trends and events. It's both fun and productive here! π
π OneEntry Headless CMS π
Don't miss out β level up with us! ππ¨βπ»
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯10β€3π3
CHALLENGE β
function tag(strings, ...values) {
return strings.reduce((acc, str, i) => {
return acc + str + (values[i] ? values[i].toUpperCase() : '');
}, '');
}
const first = "hello";
const second = "world";
const result = tag`${first} and ${second} are great!`;
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7π₯5π2
What is the output?
Anonymous Quiz
54%
HELLO and WORLD are great!
28%
hello and world are great!
10%
HELLO and WORLD
8%
HELLO and WORLD are great!HELLO
π1
A brief nine minute documentary exploring the origins of Deno with Ryan Dahl and Bert Belder. A good, quick way to get up to speed with the motivations behind the alternative JavaScript runtime.
Honeypot
Please open Telegram to view this post
VIEW IN TELEGRAM
β€2π2π₯1
CHALLENGE β
let funcs = [];
for (var i = 0; i < 3; i++) {
funcs.push(() => i);
}
console.log(funcs[0]());
console.log(funcs[1]());
console.log(funcs[2]());
Please open Telegram to view this post
VIEW IN TELEGRAM
π€6β€5π5π₯1
π€28π10π€©5β€4π₯1
Wraps around fs.watch / fs.watchFile and normalizes the events received, applies some best practices, and presents an API that works the same across different platforms.
Paul Miller
Please open Telegram to view this post
VIEW IN TELEGRAM
π7β€2π₯1
CHALLENGE β
const person = {
name: "John",
greet: function() {
const getMessage = () => `Hello, ${this.name}`;
return getMessage();
}
};
console.log(person.greet());
Please open Telegram to view this post
VIEW IN TELEGRAM
π8β€2
What is the output?
Anonymous Quiz
20%
Hello, undefined
65%
Hello, John
10%
Hello, [object Object]
5%
Error
π7π₯6π€4β€2
CHALLENGE β
const animal = {
sound: "Generic sound",
makeSound() {
return this.sound;
}
};
const dog = Object.freeze(Object.create(animal));
dog.sound = "Bark";
const result = dog.makeSound();
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π10β€8
π7π₯7β€5π€3
Weβre not just talking the obvious like + and - but things like βΏβ, Ξ£, Ξ , β, and set notation.
Joshua Nussbaum
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯7π3β€2
CHALLENGE β
var a = 5;
function test() {
console.log(a);
var a = 10;
console.log(a);
}
test();
Please open Telegram to view this post
VIEW IN TELEGRAM
π17
π€£42π€18π15π₯5β€1
Available in the form of React/Preact, Vue, Svelte, Angular, or plain JS components. Open source but with a premium version with extra features. GitHub repo.
Tom Γsterlund
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯6π5β€2
CHALLENGE β
const original = Object.freeze({ a: [1, 2, 3] });
const copy = { ...original };
copy.a.push(4);
console.log(original.a);
console.log(copy.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯5π1
What is the output?
Anonymous Quiz
48%
[1, 2, 3], [1, 2, 3, 4]
28%
[1, 2, 3, 4], [1, 2, 3, 4]
7%
[1, 2, 3, 4], [1, 2, 3]
16%
[1, 2, 3], [4]
π€23π₯11π6β€4π€£2π€©1
AbortController is a broadly available mechanism for, originally, aborting Web requests on demand, but you can use it for a lot more than that (or βanything!β, as Artem explains).
Artem Zakharchenko
Please open Telegram to view this post
VIEW IN TELEGRAM
π6β€3π₯1