const string = "abacabadabacaba";
const result = string.split("a").length - 1;
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π10
π€36 17π8π€£2
HTML version
ModularAdmin is an open source dashboard theme built in a modular way. That makes it easy to scale, modify and maintain.
modularcode
Please open Telegram to view this post
VIEW IN TELEGRAM
const product = {
name: "Laptop",
price: 1000,
discount: function(percentage) {
return this.price * (percentage / 100);
}
};
const result = product.discount(10);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€14π1
Please open Telegram to view this post
VIEW IN TELEGRAM
π16 6β€3
const x = [1, 2, 3];
const y = x;
y.push(4);
console.log(x);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
61%
[1, 2, 3, 4]
24%
[1, 2, 3]
9%
[1, 2, 3] [1, 2, 3, 4]
6%
TypeError: console.log is not a function
π25π€13π€£7 6β€2
JSR is a new package repository being introduced by the team at Deno that aims to solve many problems in the Javascript eco-system. I was invited to take part in very early access to it and want to share my impressions.
Kitson P. Kelly
Please open Telegram to view this post
VIEW IN TELEGRAM
let i = 0;
for (; i < 5; i++) {
setTimeout(() => console.log(i), 0);
}
Please open Telegram to view this post
VIEW IN TELEGRAM
β€9π7
π€57π14π€©7 2
Work on React Compiler has progressed with it now powering Instagramβs prod site ('React 19 Will Be Compiled' goes into depth on what the compiler means for most React devs). We also learn React 19 is on the way and will include breaking changes to support things like Web Components.
THE REACT.JS CORE TEAM
Please open Telegram to view this post
VIEW IN TELEGRAM
const num = 8;
const obj = {
num: 10,
inner: {
num: 6,
getNum: function() {
return this.num;
}
}
};
console.log(obj.inner.getNum());
const getNum = obj.inner.getNum;
console.log(getNum());
Please open Telegram to view this post
VIEW IN TELEGRAM
Rafael, of the Node.js TSC and Fastify core team, shares a useful update on the evolution of Node.js over the past year, how the team ensures Node is well tested and reliable, changes to Nodeβs vendor dependencies (of which it gained three in 2023), as well as enhancements to Nodeβs security and Web presence.
RAFAEL GONZAGA
Please open Telegram to view this post
VIEW IN TELEGRAM
π6β€3π€2 2
const person = {};
person.name.toUpperCase();
console.log(person.name);
Please open Telegram to view this post
VIEW IN TELEGRAM
π6 6β€4
I felt old when Ania said βif youβve never played Pac-Man before..β π β nonetheless, sheβs back with another of her fantastic, thorough walkthroughs.
ANIA KUBΓW
Please open Telegram to view this post
VIEW IN TELEGRAM
π17 11β€5π€©3
function fetchData(url) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (url.startsWith('https://api.example.com')) {
resolve({ data: 'Some data' });
} else {
reject(new Error('Invalid URL'));
}
}, 1000);
});
}
fetchData('https://api.example.com/data')
.then(response => console.log(response.data))
.catch(error => console.error(error));
Please open Telegram to view this post
VIEW IN TELEGRAM
β€11π11π€3 3
What is the output?
Anonymous Quiz
64%
Some data
18%
ReferenceError: resolve is not defined at line 4
10%
SyntaxError: Unexpected token '{' at line 2
8%
Error: Invalid URL at line 8