framework comes a new way to build LLM-powered agents that perform various tasks, use knowledge bases, and hold memory. Think a meta-framework like Next.js but for AI agents. GitHub repo.
Mastra
Please open Telegram to view this post
VIEW IN TELEGRAM
β€8π2π₯2π€2
CHALLENGE
function trickyQuestion() {
var a = 1;
var b = 2;
return (function() {
delete a;
delete b;
return a + b;
})();
}
console.log(trickyQuestion());
π€11π5
π€30π₯11β€5π3π€£3
Node supports WeakMap and WeakRef for working with weak references and James is a big fan of the extra abstractions they unlock. A weak reference differs from a normal reference in that it doesnβt prevent a referenced object from being garbage collected β this might sound like it has limited value, but is quite useful in certain scenarios.
James Long
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7π4π₯1
CHALLENGE
let a = 5; // binary: 0101
let b = 3; // binary: 0011
let c = a & b; // binary: 0001
let d = a | b; // binary: 0111
let e = a ^ b; // binary: 0110
console.log(c, d, e);
π7
π€£23π€13π10β€3
A TypeScript library to enhance fetch with schema validation, automatic response parsing, and type-safety, while maintaining the familiar ΥfetchΥ API.
Laurent Blondy
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯8π4β€3
CHALLENGE
function trickyFunction(a) {
a = a || 42;
let result = (function(a) {
return a * 2;
})(a);
return result;
}
console.log(trickyFunction(0));
π8β€2
π11π€£11β€6π€2π₯1
CHALLENGE
let x = 1;
function outer() {
let x = 2;
function inner() {
console.log(x);
let x = 3;
}
inner();
}
outer();
π6β€2
What is the output?
Anonymous Quiz
46%
2
36%
ReferenceError: Cannot access 'x' before initialization
8%
1
10%
undefined
π€18π10β€5π€£2
A curious quirk of TypeScriptβs type system is that it is Turing-complete which has led some developers to implement apps entirely in the type system. One such developer has spent eighteen months producing 177 terabytes of types to get 1993βs Doom running with them. Ridiculous and amazing in equal measure, he
Sarah Gooding (Socket)
Please open Telegram to view this post
VIEW IN TELEGRAM
π8β€5π₯4
CHALLENGE
const user = {
name: 'John',
greet() {
const getName = () => {
console.log(this.name);
};
getName();
},
farewell: function() {
function getName() {
console.log(this.name);
}
getName();
}
};
user.greet();
user.farewell();
π2
What is the output?
Anonymous Quiz
33%
John undefined
41%
John John
14%
undefined undefined
13%
undefined John
π€16π15π€£5β€4π₯4
A mature Svelte component library for creating interactive node-based UIs and diagrams. v11 adds the ability to toggle between βsnap gridβ and freeform modes for manipulating elements. (Thereβs a live demo at the bottom of the homepage.)
Open Source Labs
Please open Telegram to view this post
VIEW IN TELEGRAM
π4π₯2β€1
CHALLENGE
const arr = [1, 2, 3, 4, 5];
const result = arr
.map(x => x * 2)
.filter(x => x > 5)
.reduce((acc, val) => {
return acc + (val % 3 === 0 ? val : 0);
}, 0);
console.log(result);
π12
π16β€7π€6
This media is not supported in your browser
VIEW IN TELEGRAM
Thank You for 30k! π«‘
Weβve just hit a major milestone: 30,000 subscribers!β‘οΈ
Thank you for being part of our community. Your support and engagement mean the world to us, and weβre excited to keep bringing you the content you love.
Stay tuned for more updates and great things ahead!
P.S. Play the video with the sound on.
@JavaScript Newsletter Team
βοΈ Check out our emoji pack here
π€ Collaboration
Weβve just hit a major milestone: 30,000 subscribers!
Thank you for being part of our community. Your support and engagement mean the world to us, and weβre excited to keep bringing you the content you love.
Stay tuned for more updates and great things ahead!
P.S. Play the video with the sound on.
@JavaScript Newsletter Team
Please open Telegram to view this post
VIEW IN TELEGRAM
2π20β€9π€©5π₯2
CHALLENGE
const items = new WeakSet();
const obj1 = { id: 1 };
const obj2 = { id: 2 };
items.add(obj1);
items.add(obj2);
obj2.value = 'test';
console.log(items.has(obj2));
obj2 = null;
setTimeout(() => {
console.log(items.has(obj2));
}, 0);
π9