
MD1_Ôn tập 1
Quiz
•
Education
•
1st - 5th Grade
•
Practice Problem
•
Medium
Bach Nguyen
Used 24+ times
FREE Resource
Enhance your content in a minute
60 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Gọi hàm có tên là myFunction() như thế nào?
call myFunction();
myFuncti0n();
myFunction{};
myFunction();
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đâu là những mô tả đúng về hàm được khai báo dưới đây:
function add(a, b) {
return a + b;}
Hàm trả về số nguyên là tổng của hai tham số truyền vào
Hàm thiếu kiểu dữ liệu trả về
Hàm có 2 tham số và không trả về kết quả
Hàm có tên là add và Hàm có 2 tham số
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho hàm func1 như sau:
function func1(a) {
if (a == 2) {
return 2;
}
return a * func1(a - 1);
}
console.log(func1(5));
120
5
240
2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Một hàm trong JavaScript bắt buộc phải có lệnh return để trả về kết quả?
Đúng
Sai
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hãy phân tích và chỉ ra kết quả thực thi đoạn mã sau:
function swap(a, b) {
var temp = a;
a = b;
b = temp;
}
var a = 8; var b = 9; swap(a, b); document.write("a = " + a + ", b = " + b)
a = 8, b = 9
a = 8, b = 8
a = 9, b = 8
a=9, b=9
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Xác định kết quả của biến sum sau khi đoạn mã sau được thực thi:
function add(a, b) {
return a + b;
}
let sum = add("5", "7");
console.log(sum);
not defined
57
12
Xảy ra lỗi
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Mô tả nào không đúng về hàm sau:
function add(a, b) {
return a + b;
}
Hàm sai cú pháp
Hàm không có dữ liệu trả về
Chỉ nhận vào tham số dạng số
Tất cả đều đúng
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
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
