Telegram Group & Telegram Channel
🖥 Практика This

Каким будет вывод этого фрагмента кода?

function f() {
this.x = 5;
console.log(this);
}
var o = new f();
console.log(o.x);


Каким будет вывод этого фрагмента кода?

var o = {
f: function() {
return this;
}
}
console.log(o.f())


Каким будет вывод этого фрагмента кода?

var o = {
f: function() {
return this;
}
}
var o2 = {f: o.f};
console.log(o.f());
console.log(o2.f())


Каким будет вывод этого фрагмента кода?

function f() {
console.log( this );
}

let user = {
g: f.bind(null)
};

user.g();


Каким будет вывод этого фрагмента кода?

function sayHi() {
alert( this.name );
}
sayHi.test = 5;

let bound = sayHi.bind({
name: "Вася"
});

alert( bound.test );


#this #frontend #javascript
Please open Telegram to view this post
VIEW IN TELEGRAM



group-telegram.com/reactify_IT/1366
Create:
Last Update:

🖥 Практика This

Каким будет вывод этого фрагмента кода?


function f() {
this.x = 5;
console.log(this);
}
var o = new f();
console.log(o.x);


Каким будет вывод этого фрагмента кода?

var o = {
f: function() {
return this;
}
}
console.log(o.f())


Каким будет вывод этого фрагмента кода?

var o = {
f: function() {
return this;
}
}
var o2 = {f: o.f};
console.log(o.f());
console.log(o2.f())


Каким будет вывод этого фрагмента кода?

function f() {
console.log( this );
}

let user = {
g: f.bind(null)
};

user.g();


Каким будет вывод этого фрагмента кода?

function sayHi() {
alert( this.name );
}
sayHi.test = 5;

let bound = sayHi.bind({
name: "Вася"
});

alert( bound.test );


#this #frontend #javascript

BY Reactify | Frontend Разработка


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/reactify_IT/1366

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

The Security Service of Ukraine said in a tweet that it was able to effectively target Russian convoys near Kyiv because of messages sent to an official Telegram bot account called "STOP Russian War." "He has kind of an old-school cyber-libertarian world view where technology is there to set you free," Maréchal said. On Telegram’s website, it says that Pavel Durov “supports Telegram financially and ideologically while Nikolai (Duvov)’s input is technological.” Currently, the Telegram team is based in Dubai, having moved around from Berlin, London and Singapore after departing Russia. Meanwhile, the company which owns Telegram is registered in the British Virgin Islands. Ukrainian forces have since put up a strong resistance to the Russian troops amid the war that has left hundreds of Ukrainian civilians, including children, dead, according to the United Nations. Ukrainian and international officials have accused Russia of targeting civilian populations with shelling and bombardments.
from in


Telegram Reactify | Frontend Разработка
FROM American