SDN302_-_SP_2025_-_FE_3595.webp
Hanami2001

SDN302_-_SP_2025_-_FE_3595.webp

☑Kizspy.me
(Choose 2 answers)
☐ A
Consider the following code snippet using async/await:
async function fetchData() {
}
try {
let response = await fetch('https://api.example.com/data');
let data = await response.json();
console.log(data);
} catch (error) {
console.error('Error:', error);
fetchData();
What are the advantages of using async/await in this code?
A. It makes the code easier to read and understand.
B. It ensures the code runs synchronously.
C. It simplifies error handling with try/catch blocks.
D. It eliminates the need for callbacks entirely.
FUO.sh
sh the exam.

Thông tin

Category
SDN302
Thêm bởi
Hanami2001
Ngày thêm
Lượt xem
3,337
Lượt bình luận
16
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom