First the memory and performance; When you use a class field to define a function, your whole method resides on each instance of the class and NOT on the prototype, but using the bind technic, just a small callback is stored on each instance, which calls your method that is stored on the prototype.
Second thing that can be affected is how you write your unit tests. You won't be able to use the component prototype to stub on function calls like below:
const like = false
const http = require("http")
http.createServer((req, res) => {
//Видимо сначала надо вернуть с сервера значение like.
res.writeHead(200, {"Content-Type": "application/json"});
res.end(`
{ "like": ${like} }
`); // Не шарю в ноде, так что вот так накостылял
}).listen(8080, () => console.log("Server is on..."))
Uncaught ReferenceError: require is not defined
const seq = [1];
let upper = 0;
let lower = 0;
const dblLinear = n => {
while (n >= seq.length) {
const y = seq[lower] * 2 + 1;
const z = seq[upper] * 3 + 1;
if (y < z) {
seq.push(y);
lower += 1;
}
else {
seq.push(z);
upper += 1;
}
}
return seq[n];
}
if(links.every(link => isVisited(link))) {
unblockSpecialLink();
}
const points = ["A", "B", "C"];
const sides = [];
for(let i = 0; i < points.length - 1; i++) {
const a = points[i];
for(let j = i+1; j < points.length; j++) {
const b = points[j];
if(a !== b) {
sides.push([a,b]);
}
}
}
console.log(sides);
// Выведет
//[ ["A", "B"], ["A", "C"], ["B", "C"] ]