const
? ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶11¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1___1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶¶1_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶¶¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1__¶¶¶¶¶¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1__¶¶¶¶¶¶1_1¶¶¶¶¶¶11____1¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__1¶¶¶¶¶¶1__¶¶11_____1111__¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1__¶¶¶¶¶¶¶________11¶¶¶¶¶¶¶1_1¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_1¶¶¶¶¶¶¶1_1¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶_1¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶__1¶¶¶¶¶¶¶¶¶_1¶__¶¶¶¶¶¶¶¶¶¶¶1__1¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_11111111____1__¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_________11¶¶¶1_1¶¶¶
¶¶¶¶¶¶¶¶¶¶¶1_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶
¶¶¶¶¶¶¶¶¶1___¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶
¶¶¶¶¶¶¶1__11_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_1¶¶¶11111______1¶¶¶
¶¶¶¶1___1¶¶¶11¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1__________111¶¶_1¶¶¶
¶¶1__1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_¶¶¶¶¶¶¶¶¶¶¶¶¶¶__¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_111¶¶¶¶¶¶¶¶¶¶1__¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__1____________1¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_1¶¶¶¶¶¶111¶¶__¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶11___1¶¶¶¶¶¶1_1¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1__________1¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶11¶¶¶¶¶¶¶¶¶¶¶1___1¶¶¶¶¶111¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1___11¶¶¶¶¶1____1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶1___11_________1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶1__1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
new
, необходимо городить вот этот огород:function User(name) {
if (!new.target) { // в случае, если вы вызвали меня без оператора new
return new User(name); // ...я добавлю new за вас
}
this.name = name;
}
let john = User("John"); // переадресовывает вызов на new User
alert(john.name); // John
class foo {
async static create() {
console.log('one');
this.sleep(2000); // <<<
console.log('two');
this.sleep(2000); // <<<
console.log('three');
}
sleep(milliseconds) {
const promise = new Promise(resolve => setTimeout(resolve, milliseconds));
return promise;
}
}
await (new foo()).create();
const url = `https://rutube.ru/api/video/37daa4e656174d04db06c5fca7548751`;
const options = {mode: 'no-cors'};
fetch(url, options)
.then(function (response) {
return response.text();
})
.then(function (text) {
console.log(text);
});
helperMethods = {
first: () => consoleLogNative('Hi'),
second: () => consoleLogNative('By'),
};
this.helperMethods.first();