Який з наведених варіантів правильно визначає функцію в JavaScript?

JS Base

Quiz
•
Bohdan Shcherba
•
Computers
•
1st Grade
•
2 plays
•
Medium
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
function myFunction { console.log("Hello World"); }
function: myFunction() { console.log("Hello World"); }
function myFunction() { console.log("Hello World"); }
myFunction = function() { console.log("Hello World"); }
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Яким буде значення змінної x після виконання наступного коду?
let x = 0;
while (x < 5) {
x++;
}
4
5
6
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Як за допомогою JavaScript змінити текст елементу з id "myElement" на "Hello, World!"?
document.querySelector(".myElement").textContent = "Hello, World!";
document.querySelector("#myElement").innerText = "Hello, World!";
document.querySelector("#myElement").innerHTML = "Hello, World!";
document.querySelector("myElement").textContent = "Hello, World!";
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Який з наведених виразів правильно перевіряє, чи дорівнює змінна x числу 10?
if (x = 10)
if (x == 10)
if (x === 10)
if (x != 10)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Який тип даних у JavaScript використовується для збереження текстових значень?
Number
String
Boolean
Object
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Яким буде результат виконання наступного коду?
1
2
3
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Що робить наступний код?
document.getElementById("myElement").style.color = "red";
Змінює текст елементу на "red".
Змінює колір тексту елементу на червоний.
Додає новий елемент з id "myElement".
Видаляє елемент з id "myElement".
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Яким буде результат виконання наступного коду?
let arr = ["a", "b", "c"];
console.log(arr[1]);
a
b
c
undefined
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Який метод використовується для додавання елементу до кінця масиву?
pop()
push()
shift()
unshift()
10.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Який тип даних використовується для збереження булевих значень у JavaScript?
Number
String
Boolean
Object
Explore all questions with a free account
Similar Resources on Quizizz
20 questions
app lab

Quiz
•
1st Grade
21 questions
CSS Review

Quiz
•
KG - 12th Grade
17 questions
Lección1 - JavaScript

Quiz
•
1st Grade - Professio...
20 questions
SE LIGA 3TRI LÓGICA COMPUTACIONAL

Quiz
•
1st Grade
12 questions
QZ_React 01_01

Quiz
•
1st - 5th Grade
15 questions
JS Talks, Quiz #5

Quiz
•
1st - 12th Grade
15 questions
Заканчиваем JavaScript

Quiz
•
1st Grade
19 questions
Java 1.1. Знакомство с языком программирования Java

Quiz
•
1st Grade
Popular Resources on Quizizz
17 questions
CAASPP Math Practice 3rd

Quiz
•
3rd Grade
20 questions
math review

Quiz
•
4th Grade
21 questions
6th Grade Math CAASPP Practice

Quiz
•
6th Grade
13 questions
Cinco de mayo

Interactive video
•
6th - 8th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
10 questions
4th Grade Math CAASPP (part 1)

Quiz
•
4th Grade
45 questions
5th Grade CAASPP Math Review

Quiz
•
5th Grade
Discover more resources for Computers
16 questions
Academic Olympics: National Parks

Quiz
•
1st - 5th Grade
20 questions
Telling Time to the Hour and Half hour

Quiz
•
1st Grade
12 questions
Cinco de Mayo Video Quiz

Interactive video
•
1st - 5th Grade
15 questions
goods and services

Quiz
•
1st Grade
8 questions
Rows and Columns

Quiz
•
1st - 2nd Grade
10 questions
2D and 3D shapes

Quiz
•
1st Grade
20 questions
2D and 3D shapes

Quiz
•
1st Grade
10 questions
EOG READING REVIEW#1

Quiz
•
1st - 5th Grade