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: |

The perpetrators use various names to carry out the investment scams. They may also impersonate or clone licensed capital market intermediaries by using the names, logos, credentials, websites and other details of the legitimate entities to promote the illegal schemes. Lastly, the web previews of t.me links have been given a new look, adding chat backgrounds and design elements from the fully-features Telegram Web client. A Russian Telegram channel with over 700,000 followers is spreading disinformation about Russia's invasion of Ukraine under the guise of providing "objective information" and fact-checking fake news. Its influence extends beyond the platform, with major Russian publications, government officials, and journalists citing the page's posts. The message was not authentic, with the real Zelenskiy soon denying the claim on his official Telegram channel, but the incident highlighted a major problem: disinformation quickly spreads unchecked on the encrypted app. Now safely in France with his spouse and three of his children, Kliuchnikov scrolls through Telegram to learn about the devastation happening in his home country.
from us


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