What is asynchronous JavaScript code? 💤

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 12

  • @BroCodez
    @BroCodez  10 месяцев назад +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 23 дня назад +2

    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.

  • @hunin27
    @hunin27 10 месяцев назад +20

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

  • @mikiyasayele9767
    @mikiyasayele9767 5 месяцев назад +4

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

  • @RouCodes
    @RouCodes 9 месяцев назад +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 10 месяцев назад +3

    bro is the best ❤❤
    huge fan

  • @tone2812
    @tone2812 10 месяцев назад +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 7 месяцев назад +3

      That’s me right now 😂

  • @BinaryMaestro1
    @BinaryMaestro1 10 месяцев назад +2

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

  • @kumaravelg2348
    @kumaravelg2348 10 месяцев назад +2

    By default JavaScript is Asynchronous or Synchronous ?