What is asynchronous JavaScript code? 💤

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 13

  • @BroCodez
    @BroCodez  11 หลายเดือนก่อน +8

    // synchronous = Executes line by line consecutively in a sequential manner
    // Code that waits for an operation to complete.
    // asynchronous = Allows multiple operations to be performed concurrently without waiting
    // Doesn't block the execution flow and allows the program to continue
    // (I/O operations, network requests, fetching data)
    // Handled with: Callbacks, Promises, Async/Await
    // ASYNCHRONOUS
    function func1(callback){
    setTimeout(() => {console.log("Task 1");
    callback()}, 3000);
    }
    // SYNCHRONOUS
    function func2(){
    console.log("Task 2");
    console.log("Task 3");
    console.log("Task 4");
    }
    func1(func2);

  • @imoeazy
    @imoeazy หลายเดือนก่อน +3

    you explain in such a simple, linear and logical order, when writing code. This makes it much easier to comprehend and retain such complex concepts. You have a great approach to teaching language and abstract structures. I'm a industrial psychology grad, coding is a whole different world for me.

  • @mzamomahaeng268
    @mzamomahaeng268 12 วันที่ผ่านมา

    What a brilliant practical explanation 🎉🎉🎉

  • @mikiyasayele9767
    @mikiyasayele9767 6 หลายเดือนก่อน +4

    Best of best ytv we have never seen bro you are real man of code may your bless of code upon us😂

  • @hunin27
    @hunin27 11 หลายเดือนก่อน +20

    hey, i noticed you dont have videos on local storage or session storage, do you mind explaining them together with cookies 🍪?

  • @RouCodes
    @RouCodes 10 หลายเดือนก่อน +4

    I appreciate your videos and your teaching approach; however, I have a question about the terminology. You often refer to what's inside the function as "arguments," such as mentioning "callback" as a parameter and "func2" as an argument. Could you clarify if "callback" is actually a parameter and if "func2" is considered an argument? Thank you, sir.😊

  • @TahaZolfi
    @TahaZolfi 11 หลายเดือนก่อน +3

    bro is the best ❤❤
    huge fan

  • @tone2812
    @tone2812 11 หลายเดือนก่อน +4

    Being stupid and watching this is super hard. I know what’s going on but I just can’t comprehend it

    • @l-fitness3590
      @l-fitness3590 8 หลายเดือนก่อน +3

      That’s me right now 😂

  • @BinaryMaestro1
    @BinaryMaestro1 11 หลายเดือนก่อน +2

    I have an idea what can u do after this course how abt solidity ?

  • @kumaravelg2348
    @kumaravelg2348 11 หลายเดือนก่อน +2

    By default JavaScript is Asynchronous or Synchronous ?