
Câu hỏi về JavaScript b2
Authored by B22DCCN034 Anh
Information Technology (IT)
8th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong JavaScript, câu lệnh nào được dùng để kiểm tra một điều kiện và thực thi một khối mã nếu điều kiện đó đúng?
while
switch
if
for
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code nào sau đây sẽ in ra "Lớn" nếu biến `x` lớn hơn 10?
if (x > 10) { console.log("Lớn"); }
else if (x > 10) { console.log("Lớn"); }
if x > 10: console.log("Lớn")
if (x > 10) then { console.log("Lớn"); }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để thực thi một khối mã nhiều lần với số lần lặp đã biết, bạn sẽ sử dụng vòng lặp nào?
while
do...while
for
switch
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Vòng lặp `while` khác với vòng lặp `do...while` ở điểm nào?
`while` không cần điều kiện lặp.
`do...while` luôn thực thi khối mã ít nhất một lần.
`while` chỉ thực thi khối mã một lần.
Chúng hoàn toàn giống nhau.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Từ khóa `break` trong một vòng lặp có tác dụng gì?
Bỏ qua lần lặp hiện tại và tiếp tục lần lặp tiếp theo.
Tạm dừng chương trình.
Thoát khỏi vòng lặp hiện tại.
Quay trở lại đầu vòng lặp.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào dưới đây sử dụng cấu trúc `switch case` một cách chính xác?
switch (day) { case 1: console.log("Thứ Hai"); }
switch day { case 1: console.log("Thứ Hai"); }
switch (day) { if (day == 1) { console.log("Thứ Hai"); } }
case day { 1: console.log("Thứ Hai"); }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để in ra các số từ 1 đến 5, bạn sẽ điền gì vào chỗ trống trong vòng lặp sau?
for (let i = 1; _____; i++) { console.log(i); }
i < 5
i <= 5
i == 5
i < 6
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Laws of Exponents
Quiz
•
8th Grade
11 questions
Valentines Day
Quiz
•
6th - 8th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
25 questions
7th Reading STAAR Vocabulary
Quiz
•
6th - 8th Grade
25 questions
Valentine's Day Trivia
Quiz
•
8th Grade