Skip to content

Latest commit

 

History

History
225 lines (198 loc) · 8.79 KB

questions-open.md

File metadata and controls

225 lines (198 loc) · 8.79 KB
typeAnswer
data
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
2 + 9 + "1"
"111"
1
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
1 + "2" + 9
"129"
1
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
null + "8" / "4"
2
2
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
(null + "2") * "3" + 5
"NaN"
2
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
Boolean("JavaScript")
true
1
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Какой будет результат?
Boolean(undefined)
false
1
Приведение типов
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof true)
"boolean"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof NaN)
"number"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof typeof(1))
"string"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof 'true')
"string"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof isNaN)
"function"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof null)
"object"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(typeof undefined)
"undefined"
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернет следующий код?
console.log(0.1 + 0.2 == 0.3)
false
2
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Вопрос
Какой метод Object.? используется для
клонирования объектов?
assign()
2
Объекты
questionTitle questionDescription correctAnswer explanation complexity theme
Что вернёт следующий код?
const arr = [10, 12, 15, 21];
for (var i = 0; i < arr.length; i++) {
setTimeout(function() {
console.log('Index: ' + i +'
, element: ' + arr[i]);
}, 3000);
}
Index: 4, element: undefined
3
Closures
questionTitle questionDescription correctAnswer explanation complexity theme
Что выведет в консоль?
var z = 1, y = z = typeof y;
console.log(y);
undefined
2
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
const CAR = {
color: "blue",
price: 500
}
CAR.price = 1000;
console.log(CAR);
1000
1
Всплытие
questionTitle questionDescription correctAnswer explanation complexity theme
Что выведет в консоль?
num = 6;
console.log(num);
var num;
6
1
Всплытие
questionTitle questionDescription correctAnswer explanation complexity theme
Что выведет в консоль?
console.log(num);
var num = 6;
undefined
1
Всплытие
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
new String('Hello') === 'Hello'
false
1
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
"string" instanceof String;
false
2
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
var x = [typeof x, typeof y][1];
typeof typeof x;
string
2
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
(function f() {
function f() { return 1; }
return f();
function f() { return 2; }
})();
2
2
Функции
questionTitle questionDescription correctAnswer explanation complexity theme
Каким будет вывод следующего кода?
alert([] + 1 + 2);
12
3
Типы данных
questionTitle questionDescription correctAnswer explanation complexity theme
Что выведет в консоль?
var module = {
x: 42,
getX: function() {
return this.x;
}
}
var y = module.getX;
console.log(y());
undefined
2
Объекты