Какой будет результат выполнения кода?
Тест: https://proghub.dev/t/javascript-interview
Добавить свой вопрос
Тест: https://proghub.dev/t/javascript-interview
Добавить свой вопрос
👍8🔥3
  Какой будет результат выполнения кода?
  Anonymous Quiz
    20%
    выведет в консоль `proghub`
      
    23%
    возникнет `SyntaxError` т.к. нелзья обявлять `use strict` в функции
      
    57%
    возникнет ReferenceError т.к. переменная `y` не определена
      
    В основе node.js лежит движок - ...
  Anonymous Quiz
    4%
    Microsoft Chakra
      
    5%
    SpiderMonkey
      
    81%
    V8
      
    6%
    V16
      
    4%
    Proghub Super Engine
      
    💩17👍2
  Forwarded from FrontendQuiz - задачи с собеседований по фронтенду
Как будет отображаться следующий элемент?
  Anonymous Quiz
    15%
    Поле ввода с текстом "Hello World"
      
    9%
    Пустое поле ввода
      
    6%
    Текст "Hello World"
      
    55%
    Ничего отображаться не будет
      
    16%
    Поле ввода со значением "********"
      
    👍6
  ☝️Объяснение:
В JavaScript var создает переменную в контексте функции, а не контексте текущего scope. Это немного отличается от способа, который принят в типизированных языках, вроде Java или C++.
В JavaScript var создает переменную в контексте функции, а не контексте текущего scope. Это немного отличается от способа, который принят в типизированных языках, вроде Java или C++.
👍4
  Как правильно, используя jQuery, изменить размер шрифта текста "Something"?
Вопрос: https://proghub.dev/q/d89329
Добавить свой вопрос
Вопрос: https://proghub.dev/q/d89329
Добавить свой вопрос
💩36👎1
  Как правильно, используя jQuery, изменить размер шрифта текста "Something"?
  Anonymous Quiz
    19%
    `$('a[href$=\\/]').find('span').css('fontSize','18px');`  
      
    12%
    `$('a[href~=/]').find('span').css('fontSize','18px');`  
      
    19%
    `$('a[href^=\\/]').find('span').css('fontSize','18px');`  
      
    23%
    `$('a[href=/]').find('span').css('fontSize','18px');`  
      
    27%
    `$('a[href*=\/]').find('span').css('fontSize','18px');`  
      
    💩61👍2🔥2👎1
  Что выведет в консоль?
  Anonymous Quiz
    20%
    "ninja" "pomidor" "site"
      
    32%
    undefined "pomidor" "site"
      
    10%
    "ninja" undefined undefined
      
    13%
    undefined undefined undefined
      
    24%
    ничего не выведет, возникнет ошибка
      
    👍14
  ☝️Объяснение:
возникнет ошибка `error: Uncaught TypeError: Cannot read property 'name' of undefined`, документация по this + `use strict`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strictmode#SecuringJavaScript
возникнет ошибка `error: Uncaught TypeError: Cannot read property 'name' of undefined`, документация по this + `use strict`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strictmode#SecuringJavaScript
👍6
  Выберите все примитивные типы данных
  Anonymous Quiz
    77%
    string
      
    5%
    integer
      
    5%
    undefined
      
    2%
    float
      
    6%
    symbol
      
    4%
    object
      
    💩74👍10👎4
  Что выведет alert?
  Anonymous Quiz
    21%
    object Window
      
    44%
    null
      
    16%
    undefined
      
    15%
    object Object
      
    4%
    this
      
    👍10💩10👎1
  ☝️Объяснение:
ECMA-262, 3rd edition describes what should happen when null is passed in as the first argument to call():
If thisArg is null or undefined, the called function is passed the global object as the this value. Otherwise, the called function is passed ToObject(thisArg) as the this value.
ECMA-262, 3rd edition describes what should happen when null is passed in as the first argument to call():
If thisArg is null or undefined, the called function is passed the global object as the this value. Otherwise, the called function is passed ToObject(thisArg) as the this value.
👍17
  Как правильно объявить цикл `for`?
  Anonymous Quiz
    3%
    for (i <= 5; i++)  
      
    1%
    for i = 1 to 5
      
    2%
    for (i = 0; i <= 5)
      
    94%
    for (i = 0; i <= 5; i++)  
      
    💩41👎2🔥2