Please open Telegram to view this post
VIEW IN TELEGRAM
π60β€16 13π€7π€©3π€£3
class Rectangle {
constructor(width, height) {
this.width = width;
this.height = height;
}
get area() {
return this.width * this.height;
}
}
const rectangle = new Rectangle(5, 10);
console.log(rectangle.area());
Please open Telegram to view this post
VIEW IN TELEGRAM
π14π€£2
What is the output?
Anonymous Quiz
41%
TypeError: rectangle.area is not a function at line 13
12%
ReferenceError: height is not defined at line 3
11%
Error: Cannot access 'this' before initialization at line 5
36%
No error
π25 8π€7β€3
Learn more about why and where SQL injection attacks pose a threat and some initial ways to shield your Node apps against them.
LUCIEN CHEMALY
Please open Telegram to view this post
VIEW IN TELEGRAM
π13β€4 4
const obj = { a: 1, b: 2 };
const key = 'c';
console.log(obj[key]);
Please open Telegram to view this post
VIEW IN TELEGRAM
π16β€4 3
What is the output?
Anonymous Quiz
27%
ReferenceError: c is not defined at line 3
52%
undefined
15%
TypeError: obj is not iterable at line 3
6%
No error
The Deno team is cooking up JSR (still behind a waitlist), a new JavaScript package registry (not merely a package management tool, like pnpm or Yarn) to address various npm limitations, including for Node users who don't even plan to use Deno.
SARAH GOODING
Please open Telegram to view this post
VIEW IN TELEGRAM
const promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve('Resolved');
reject(new Error('Rejected'));
}, 1000);
});
promise.then(response => console.log(response)).catch(error => console.error(error));
Please open Telegram to view this post
VIEW IN TELEGRAM
π11β€5
What is the output?
Anonymous Quiz
20%
Error: Rejected at line 8
54%
Resolved
18%
ReferenceError: response is not defined at line 7
9%
SyntaxError: Unexpected token 'catch' at line 9
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£93 7β€4π3π€©2π€1
CHALLENGE β
function asyncQuiz() {
return new Promise((resolve) => {
setTimeout(() => resolve('Hello'), 1000);
});
}
async function runAsyncQuiz() {
const result = await asyncQuiz();
console.log(result);
}
runAsyncQuiz();
console.log('World');Please open Telegram to view this post
VIEW IN TELEGRAM
π11
β€22 12π€9
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£99 12π5π€3π€©3
var a = 1;
function scopeQuiz() {
console.log(a);
var a = 2;
}
scopeQuiz();
Please open Telegram to view this post
VIEW IN TELEGRAM
π€23π13β€7 2
π€34 8π6β€4π€©1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£98π13 9π€5β€1π€©1
function delayedLog(item) {
setTimeout(() => {
console.log(item);
}, 1000);
}
for (var i = 0; i < 3; i++) {
delayedLog(i);
}
Please open Telegram to view this post
VIEW IN TELEGRAM
π13 13β€9π€£8π€1
A mature, rich set of open source UI components for Vue developers we first mentioned a few years ago. This new release includes components to enter one time passwords and a βstepperβ for wizard-style workflows. Thereβs also a new optional declarative syntax for using components that makes their code easier to read and write.
PRIMETEK
Please open Telegram to view this post
VIEW IN TELEGRAM
var a = 1;
const arrowQuiz = () => {
console.log(this.a);
};
arrowQuiz();
var a = 2;
Please open Telegram to view this post
VIEW IN TELEGRAM
π17β€3π€©2π€1