const string = "Lorem ipsum dolor sit amet";
const result = string.split(" ")
.map(word => word.toLowerCase())
.reduce((acc, word) => {
acc[word] = (acc[word] || 0) + 1;
return acc;
}, {});
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
48%
{ lorem: 1, Ipsum: 1, dolor: 1, sit: 1, amet: 1 }
23%
{ amet: 1, dolor: 1, ipsum: 1, lorem: 1, sit: 1 }
19%
{ lorem: 1, ipsum: 1, dolor: 1, sit: 1, amet: 2 }
10%
This will result in an error.
π€12π7 4β€2
Security releases had been expected to land in the past week for Node and theyβre now here as v21.6.2 (Current), v20.11.1 (LTS), and v18.19.1 (LTS). They include fixes for a variety of vulnerabilities, including some high severity ones involving HTTP-based DoS attacks and privilege escalation.
RAFAEL GONZAGA AND MARCO IPPOLITO
Please open Telegram to view this post
VIEW IN TELEGRAM
π5 5β€4π€1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£82π9β€8 5π€©3
const numbers = [1, 2, 3, 4, 5];
const result = numbers.filter(num => num % 2 === 0)
.map(num => num ** 2)
.reduce((acc, val) => acc + val, 0);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€9π6 2
Supports all major browsers and can be used with Angular, Vue, and React if you wish. Been around for several years now, but continues to be maintained.
OLI FOLKERD
Please open Telegram to view this post
VIEW IN TELEGRAM
const string = "Hello, World! How are you?";
const result = string.match(/[aeiou]/g).reduce((acc, char) => {
acc[char] = (acc[char] || 0) + 1;
return acc;
}, {});
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π6
What is the output?
Anonymous Quiz
16%
This will result in an error.
28%
{ a: 1, e: 1, i: 1, o: 2, u: 2 }
19%
{ a: 0, e: 1, i: 0, o: 1, u: 1 }
37%
{ a: 1, e: 2, o: 4, u: 1 }
β€13π6π€4
Node developers are wrestling with the decision to enable Corepack (a tool for managing package managers) by default, which has sparked a debate about the possibility of removing npm from the Node.js binary.
SARAH GOODING (SOCKET)
Please open Telegram to view this post
VIEW IN TELEGRAM
π€6 3β€2π2π€©1
const string = "Hello, World! How are you?";
const result = [...string.matchAll(/[aeiou]/g)]
.map(match => match[0])
.reverse()
.join("");
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
12%
"uoa eo o"
53%
"uoeaoooe"
12%
"uo er o"
24%
This will result in an error.
π11 9π€4β€2π€©1
The interactive demo on the homepage will give you the basic idea, but the library implements a variety of algorithms for creating mazes and terrain, including the use of Perlin noise, growing trees, spiral backtracking, and more. GitHub repo.
YANTRA WORKS
Please open Telegram to view this post
VIEW IN TELEGRAM
const string = "open sesame";
const result = string.split(" ").map(word => word.length);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€11π6 6π€5
Please open Telegram to view this post
VIEW IN TELEGRAM
β€20π€£18π6π€©5 1
Please open Telegram to view this post
VIEW IN TELEGRAM
β€12 7π4π€4
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