Assalamualaikum!

I am Nizam

Student of Batch-7

Digital Watch

Module-39 Practice

39-0 What matters in this milestone

39-1 What really is JavaScript?

39-2 JavaScript Engine V8 Internal mechanism

39-3 JavaScript Execution Context and Call stack

39-4 Single-threaded, Asynchronous vs Synchronous

39-5 Promise, Aync/Await

39-6 setInterval and clearInterval with x++ and ++x

Digital Watch

39-7 JavaScript event loop and concurrency

39-8 Error Handling: try, catch, throw and finally

39-9 module summary and Interview questions

See This Vudeo: : http://latentflip.com/loupe/

Link 2

Create custom error using Try and Catch

QUIZ

Q1: What is garbage collection in JavaScript?
Ans: The process of freeing up memory that is no longer being used by a program

Q2:What is the difference between synchronous and asynchronous code execution in JavaScript?
Ans: Synchronous code execution means that the code is executed in a sequential order, while asynchronous code execution means that the code is executed without waiting for the previous line to complete.

Q3:What is the event loop in JavaScript?
Ans: A mechanism that allows asynchronous code to be executed in JavaScript.

Q4:What is the difference between setTimeout and setInterval in JavaScript?
Ans: setTimeout executes a function once after a specified deley, while setInterval executes a function repeatedly at a specified interval.

Q5:How do you cancel a setTimeout or setInterval in JavaScript?
Ans: Use the clearTimeout or clearInterval method to cancel the timer

Q6:What is a Promise in JavaScript?
Ans: An object that represents a value that may not be available yet, but will be resolved or rejected in the future.

Q7:Can you use await outside of an async function?
Ans: No, await can only be used inside an async function.

Q8:What is the event loop in JavaScript?
Ans: A loop that runs events sequentially on a single thread.

Q9:What is the main difference between synchronous and asynchronous programming?
Ans: Synchronous programming executes code sequentially, while asynchronous programming does not.

Q10: Which of the following is an example of a JavaScript runtime error?
Ans: An error caused by trying to divide by zero

The End

Copyright ©2023 Allright Reserved