CHALLENGE
var obj = {
a: 10,
b: 20
};
with (obj) {
var result = a + b;
}
console.log(result);
π₯6π2π€2
π€16π12π€£8β€3
Now almost 12 years old, NodeBB continues to offer a classic forum experience in a modern Node.js-shaped guise. The big update for v4 is support for federation between NodeBB instances and the wider fediverse generally. Note that the open source project (repo) is GPL licensed with NodeBB Inc providing a hosted service.
NodeBB, Inc.
Please open Telegram to view this post
VIEW IN TELEGRAM
π7β€2π₯1
CHALLENGE
const numbers = [2, 4, 6, 8, 10];
const allEven = numbers.every(function(num) {
return num % 2 === 0;
});
console.log(allEven);
π11β€2
π₯16π5π€2
An easy-to-deploy solution for schema validation that can infer TypeScript definitions 1:1 and use them as optimized validators for your data, both at runtime and for immediate type-level feedback in your editor.
ArkType
Please open Telegram to view this post
VIEW IN TELEGRAM
π9
CHALLENGE
const numbers = [10, 23, 45, 60, 78];
const isDivisibleByFive = numbers.some(num => num % 5 === 0);
if (isDivisibleByFive) {
console.log('Some numbers are divisible by 5');
} else {
console.log('No numbers are divisible by 5');
}
π11
What is the output?
Anonymous Quiz
19%
No numbers are divisible by 5
7%
Error: num is not defined
6%
Undefined
68%
Some numbers are divisible by 5
π21β€3π€3π₯2π€£2
Please open Telegram to view this post
VIEW IN TELEGRAM
π11β€3π€3π₯2π€©1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£111π8π€3π₯2β€1
CHALLENGE
const students = [
{ name: 'Alice', age: 20 },
{ name: 'Bob', age: 22 },
{ name: 'Charlie', age: 23 }
];
const studentToFind = { name: 'Bob', age: 22 };
const isIncluded = students.includes(studentToFind);
console.log(isIncluded);
π10β€1
π€27π20π₯5β€4π€£2
Gayle McDowell
Please open Telegram to view this post
VIEW IN TELEGRAM
π9π₯4β€3
CHALLENGE
let arr = [1, 2, 3, 4, 5];
arr.length = 3;
arr.push(6, 7);
console.log(arr.length);
π3β€1
π22π€£20π€12π€©1
The JavaScriptCore-based Bun continues to up its server-side runtime game with strides forward in Node.js compatibility, performance boosts, and new APIs for interacting with S3 and S3-like object stores as well as Postgres. If youβd prefer to be
Ashcon Partovi and the Bun Team
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π5π₯3
CHALLENGE
let arr = [1, 2, 3, 4, 5];
arr.length = 3;
console.log(arr.length);
console.log(arr);
π8π₯2β€1
What is the output?
Anonymous Quiz
54%
3 [1, 2, 3]
14%
5 [1, 2, 3, 4, 5]
27%
3 [1, 2, 3, 4, 5]
6%
5 [1, 2, 3]
π₯19π12π€5β€4
π JavaScript Temporal is Coming (For Real!)
We first mentioned the Temporal API proposal providing a better way to handle dates and times in JavaScript almost five years ago (in issue 496!) but now it really is almost here. Brian explains its basic concepts and where initial support is starting to appear.
Brian Smith
We first mentioned the Temporal API proposal providing a better way to handle dates and times in JavaScript almost five years ago (in issue 496!) but now it really is almost here. Brian explains its basic concepts and where initial support is starting to appear.
Brian Smith
β€7π3π₯3
CHALLENGE
const person = {
name: "Alice",
age: 30,
city: "New York"
};
const keys = Object.keys(person);
const values = Object.values(person);
const result = keys.map((key, index) => `${key}: ${values[index]}`);
console.log(result);
π9π€£5π€3