NEW
Font size
WorksheetsFe bronze
Total questions: 18
Worksheet time: 9mins
Chọn đáp án đúng:
console.log(`The value of b is ${b}`); let b;
The value of b is undefined
The value of b is
Error
The value of b is b
console.log(typeof class School {});
class
object
function
undifined
a
b
c
d
syntax error vì x là const
{
value1: 1,
value2: 2
}
{
value1: 3,
value2: 5
}
{
value1: 1,
value2: 5
}
a
b
c
d
a
b
c
d
a
b
c
d
Error
Value: 10
Value: undifined
Value: [object Promise]
This is a, This is b
This is b, This is a
Error
,
const every = [0,1,2,3,4].every(item=>item);
console.log(every);
[0,1,2,3]
[1,2,3,4]
4
false
a
b
c
d
<form/> element có những method nào
get, put, patch, post, delete
get, post
get, put, patch, post
SCSS to SCC
a
b
c
d
.childA {
text-align: center;
}
.parent {
text-align: center
}
.parent {
display: flex;
justify-content: center;
}
.parent {
display: flex;
align-items: center;
}
Trong react 17, setState dùng cơ chế nào để so sánh giá trị cũ và giá trị hiện tại:
Virtual Dom tự nhận biết
Deep compare
Shallow compare
useEffect( ()=>{ console.log("running") } )
"running" được hiển thị liên tục kể cả component không re-render
"running" được hiển thị duy nhất 1 lần
"running" được hiển thị sau mỗi lần component re-render
Lỗi thiếu dependency
Hàm return trong useEffect:
Chạy sau hàm render, khi dependencies thay đổi
Chạy trước hàm render, khi dependencies thay đổi
Chạy sau hàm render, chạy 1 lần khi component được render
Chạy trước khi component unmount
setState
Là đồng bộ
Là bất đồng bộ
Ko thể truyền callback function
Nếu truyền 1 callback function vào thì là đồng bộ, còn ko thì bất đồng bộ
