
Câu hỏi về JavaScript b2
Quiz
•
Information Technology (IT)
•
8th Grade
•
Medium
B22DCCN034 Anh
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Information Technology (IT)
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
12 questions
Digital Citizenship BSMS
Quiz
•
6th - 8th Grade
20 questions
Physical and Chemical Changes
Quiz
•
8th Grade
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween History Trivia
Quiz
•
7th - 8th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
