Telegram Group & Telegram Channel
🖥 Что будет в консоли?

1. Каким будет вывод этого фрагмента кода?
var foo = 1; 
function bar() {
if (!foo) {
var foo = 10;
}
console.log(foo);
}
bar();


2. Каким будет вывод этого фрагмента кода?
function foo() { 
var x = 1;
if (x) {
(function () {
var x = 2;
}());
}
console.log(x)
}


3. Каким будет вывод этого фрагмента кода?
function f() {
console.log( this );
}

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

user.g();


4. Каким будет вывод этого фрагмента кода?
function greetWaitAndAgain() {
console.log(`Hello, ${this.name}!`)
setTimeout(() => {
console.log(`Hello again, ${this.name}!`)
})
}

const user = { name: 'Alex' }

user.greetWaitAndAgain = greetWaitAndAgain;
user.greetWaitAndAgain()


5. Каким будет вывод этого фрагмента кода?
function f() {
this.x = 5;
console.log(this);
}
var o = new f();
console.log(o.x);


#this #javascript #замыкание #собеседование
Please open Telegram to view this post
VIEW IN TELEGRAM



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

🖥 Что будет в консоли?

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

var foo = 1; 
function bar() {
if (!foo) {
var foo = 10;
}
console.log(foo);
}
bar();


2. Каким будет вывод этого фрагмента кода?
function foo() { 
var x = 1;
if (x) {
(function () {
var x = 2;
}());
}
console.log(x)
}


3. Каким будет вывод этого фрагмента кода?
function f() {
console.log( this );
}

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

user.g();


4. Каким будет вывод этого фрагмента кода?
function greetWaitAndAgain() {
console.log(`Hello, ${this.name}!`)
setTimeout(() => {
console.log(`Hello again, ${this.name}!`)
})
}

const user = { name: 'Alex' }

user.greetWaitAndAgain = greetWaitAndAgain;
user.greetWaitAndAgain()


5. Каким будет вывод этого фрагмента кода?
function f() {
this.x = 5;
console.log(this);
}
var o = new f();
console.log(o.x);


#this #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/1384

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

I want a secure messaging app, should I use Telegram? Either way, Durov says that he withdrew his resignation but that he was ousted from his company anyway. Subsequently, control of the company was reportedly handed to oligarchs Alisher Usmanov and Igor Sechin, both allegedly close associates of Russian leader Vladimir Putin. Telegram does offer end-to-end encrypted communications through Secret Chats, but this is not the default setting. Standard conversations use the MTProto method, enabling server-client encryption but with them stored on the server for ease-of-access. This makes using Telegram across multiple devices simple, but also means that the regular Telegram chats you’re having with folks are not as secure as you may believe. On December 23rd, 2020, Pavel Durov posted to his channel that the company would need to start generating revenue. In early 2021, he added that any advertising on the platform would not use user data for targeting, and that it would be focused on “large one-to-many channels.” He pledged that ads would be “non-intrusive” and that most users would simply not notice any change. In 2014, Pavel Durov fled the country after allies of the Kremlin took control of the social networking site most know just as VK. Russia's intelligence agency had asked Durov to turn over the data of anti-Kremlin protesters. Durov refused to do so.
from sg


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