31615
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
👩🦯 ESLint now officially supports linting of JSON and Markdown
Читать полностью…
🔥 How an incredibly amateur mistake left Arc Browser wide open to hackers
Читать полностью…
😉Bundling: The Past, Present and Future
A history lesson on bundlers, why they’re used, the problems they solve, the current ecosystem, and a look at the potential future for these tools.
Devon Govett
✌️ VoidZero: A Next-Generation Toolchain for JavaScript
Not content to have merely created Vue.js and Vite, JavaScript powerhouse Evan You has unveiled his latest adventure: a $4.6m funded company building an open-source unified development toolchain for the JavaScript ecosystem. With his track record, this is as good an attempt as it gets.
Evan You
👍 gradient-string 3.0: Beautiful Color Gradients in Terminal Output
What’s the next step up from colorizing the text output of your Node-powered CLI app? Gradients. v3.0 is rewritten in TypeScript and is a pure ES module.
Boris K
🤟 µExpress / Ultimate Express: Like Express, But Faster?
It’s not Express, but a reimplementation of Express’s functionality with API compatibility. Based on µWebSockets, and with an optimized router, it boasts faster performance than regular Express, but needs some C++ magic to make it happen.
dimden
✌️ Don't Sleep on AbortController
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
👀 Schedule-X 2: A Modern Event Calendar Component
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
👀 Mathematical Symbols and JavaScript Equivalents
We’re not just talking the obvious like + and - but things like ⁿ√, Σ, Π, ∃, and set notation.
Joshua Nussbaum
💻 Deno 2 is here… will it actually kill Node.js this time?
🔥 Fireship
👍 Chokidar 4.0: Efficient Cross-Platform File Watching Library
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
😉 From Node.js to Deno: How It All Began
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
CHALLENGE ❓
Читать полностью…
async function asyncFunc() {
console.log('Async Start');
await new Promise(resolve => setTimeout(resolve, 100));
console.log('Async End');
}
console.log('Script Start');
asyncFunc();
setTimeout(() => console.log('Timeout 1'), 50);
setTimeout(() => console.log('Timeout 2'), 150);
console.log('Script End');
CHALLENGE ❓
Читать полностью…
setTimeout(() => {
console.log('setTimeout 1');
Promise.resolve().then(() => console.log('Promise 1'));
}, 0);
Promise.resolve().then(() => {
console.log('Promise 2');
setTimeout(() => console.log('setTimeout 2'), 0);
});
console.log('Sync');
CHALLENGE ❓
Читать полностью…
console.log('A');
setTimeout(() => console.log('B'), 0);
Promise.resolve().then(() => console.log('C'));
console.log('D');
CHALLENGE ❓
Читать полностью…
console.log(1);
setTimeout(() => console.log(2), 0);
Promise.resolve()
.then(() => {
console.log(3);
return Promise.resolve(4);
})
.then(console.log);
console.log(5);
CHALLENGE ❓
Читать полностью…
async function fetchData() {
console.log('Fetching...');
await new Promise((resolve) => {
setTimeout(() => {
console.log('Data fetched');
resolve();
}, 100);
});
console.log('Process completed');
}
fetchData();
console.log('End of script');
CHALLENGE ❓
Читать полностью…
const arr = [1, 2, 3];
const newArr = arr.map(num => num * 2);
newArr.push(4);
arr[0] = 0;
console.log(arr);
console.log(newArr);
CHALLENGE ❓
Читать полностью…
function* generatorFunction() {
yield 1;
yield* function* () {
yield 2;
yield 3;
}();
yield 4;
}
const gen = generatorFunction();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
CHALLENGE ❓
Читать полностью…
const obj = {
value: 100,
method: function() {
const inner = function() {
console.log(this.value);
};
inner();
}
};
obj.method();
CHALLENGE ❓
Читать полностью…
const promise = new Promise((resolve) => {
console.log('Promise started');
setTimeout(() => {
resolve('Promise resolved');
}, 100);
});
promise.then((result) => {
console.log(result);
});
console.log('End of script');
CHALLENGE ❓
Читать полностью…
const original = Object.freeze({ a: [1, 2, 3] });
const copy = { ...original };
copy.a.push(4);
console.log(original.a);
console.log(copy.a);
CHALLENGE ❓
Читать полностью…
var a = 5;
function test() {
console.log(a);
var a = 10;
console.log(a);
}
test();
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);
CHALLENGE ❓
Читать полностью…
const person = {
name: "John",
greet: function() {
const getMessage = () => `Hello, ${this.name}`;
return getMessage();
}
};
console.log(person.greet());
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]());
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);