Host: Xubuntu 23.10 (mantic)
# id
uid=1000(roman) gid=1000(roman) ...
Dockerfile:
FROM node:21.6.2-bookworm
RUN apt-get update && apt-get install sudo
RUN echo "node:root" | chpasswd && usermod -aG sudo node
USER node
#docker #node #chmod
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7π7 6
const string = "hello world";
const result = string.split("").filter((char, index) => index % 2 === 0).join("");
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€10π8 8π€3
GitHub co-founder Scott Chacon gave a spirited talk at FOSDEM 2024 digging into many interesting parts of git, as well as a few GitHub bits. If youβd prefer to read rather than watch, he has some blog posts covering it all too.
SCOTT CHACON
Please open Telegram to view this post
VIEW IN TELEGRAM
π10 5β€3
const string = "abacabadabacaba";
const result = string.split("").reduce((acc, val) => {
acc[val] = (acc[val] || 0) + 1;
return acc;
}, {});
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π3 2
What is thte output?
Anonymous Quiz
22%
{ a: 6, b: 4, c: 3, d: 2 }
65%
{ a: 8, b: 4, c: 2, d: 1 }
10%
{ a: 7, b: 4, c: 2, d: 1 }
4%
{ a: 7, b: 5, c: 2, d: 1 }
π13β€7π€©5 4
Set was introduced back in ECMAScript 2015 (a.k.a. ES6) but only had some basic methods built-in. Phil looks at what sets can do and what new features are on the way.
PHIL NASH
Please open Telegram to view this post
VIEW IN TELEGRAM
π14 5β€2
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