Callback Hell | Ep 01 Season 02 - Namaste JavaScript

Callback Hell is one of the issues we face while writing Asynchronous code in JavaScript. Another problem that we face is Inversion of Control. This episode of Namaste JavaScript season the 2 covers Good Parts as well as the Bad parts of using Callbacks.
If you find this video helpful,
Please support me by giving a Super Thanks contribution to the video ♥️
If not by money,
you can also support this video series, by sharing it with your friends on Social Media. 🙏
I'll give my best to come up with great content and everything absolutely for free on KZread. 😊
Also, give it a thumbs up and subscribe to my channel for more such videos. 🔔
Link to Subscribe: kzread.info...
Cheers,
Akshay Saini
akshaysaini.in
Stay Connected:
LinkedIn - / akshaymarch7
Facebook - / akshaymarch7
Instagram - / akshaymarch7
Twitter - / akshaymarch7
#NamasteJavaScript #AkshaySaini

Пікірлер: 1 500

  • @akshaymarch7
    @akshaymarch7 Жыл бұрын

    Watch Episode 2 - PROMISE in JS - kzread.info/dash/bejne/k6RhmLKJcdixYbw.html What more topics do you want me to cover next in this series?

  • @itumandal22

    @itumandal22

    Жыл бұрын

    Debouncing and throttling with example and when to use? Please cover these two topics as well.

  • @maheshbhat2049

    @maheshbhat2049

    Жыл бұрын

    Please explain Classes and constructor(--prto--:object;null),Function object Prototype,Super

  • @akshay-kumar-007

    @akshay-kumar-007

    Жыл бұрын

    design patterns (GoF) in JavaScript/TypeScript

  • @shaiksamiulla6923

    @shaiksamiulla6923

    Жыл бұрын

    please explain design pattern in js

  • @nizamph2022

    @nizamph2022

    Жыл бұрын

    explain "this" on java script

  • @mubasharali5409
    @mubasharali5409 Жыл бұрын

    Two issues while using callbacks 1 - Callback hell When a function is passed as an argument to another function, it becomes a callback function. This process continues and there are many callbacks inside another's Callback function. This grows the code horizontally instead of vertically. That mechanism is known as callback hell. 2 - Inversion of control The callback function is passed to another callback, this way we lose the control of our code. We don't know what is happening behind the scene and the program becomes very difficult to maintain. That process is called inversion of control. Thank you for making this series ❣️

  • @manumanu6321

    @manumanu6321

    9 ай бұрын

    bro invertion of control is we giving the control to the another nested call back funtion

  • @sahilgupta9622

    @sahilgupta9622

    5 ай бұрын

    Yup which increases the dependencies to other one

  • @rohandavid305
    @rohandavid305 Жыл бұрын

    was waiting more impatiently for season2 than Thanos did for infinity stones

  • @omprakashpandey4318
    @omprakashpandey431810 ай бұрын

    I am mechanical engineer, in Indonesia but Indian , have nothing to do with it but loved the way made it interesting, fearless and understandable to people like me 57years of age hard core mechanical All i have to say GOD BLESS YOU, YOU ARE GREAT

  • @keerthanar9723
    @keerthanar97234 ай бұрын

    JavaScript is synchronous single threaded language, just do one thing at a time. The callback function do the asynchronous code in js. 1. Callback hell - Callback passed into another function as an argument and another function passed into the callback function as nested callback. So code go horizontally inside vertically. So the callback code as unmaintainable ans unreadable. It's also known as pyramid doom 2. Inversion of control - The callback function is passing to another function as an argument. So our callback function blindly trust the other function. Whether this will execute or not. Thank you so much for your brief and clear explanation 🤝

  • @gurpreetsandha9090
    @gurpreetsandha9090 Жыл бұрын

    Your teaching is so good that even a honeybee wants to learn JavaScript from you 😂😂

  • @shikharverma1253

    @shikharverma1253

    2 ай бұрын

    bzzzzzz

  • @VK-lh7qc
    @VK-lh7qc6 ай бұрын

    While using callback we face 2 issues which are as follows: 1. Callback Hell : When more than 1 APIs depend on each other to get call so then we pass the callback function inside callback function so it created nested callback function this makes our code less maintainable and readable this is callback hell. It also know as "Pyramid of Doom". 2. Inversion of Control: When we pass a callback function into another function then the execution of callback function is depend on that function so in this way we loose the control over our code this is know as Inversion of Control. Thankyou so much Akshay Saini Bhaiya for such a amazing video series of Javascript😊.

  • @joyyy439
    @joyyy439 Жыл бұрын

    Pro: JS is a single-thread language and is synchronous by nature, but with callbacks, we can make async calls. Cons: a. Callback hell - If we have many functions that need to be called, it is easy to fall into a callback hell - many callbacks chain together b. Inversion of control - We give the power to the function that calls our function, maybe that function will never be called, or something in their function makes our function be called twice. Thank you for your video! It is very engaging and informative! I didn't expect that I would stick to the end at first, but you did a great job!

  • @sudiptachakraborty1748
    @sudiptachakraborty1748 Жыл бұрын

    Thank you Akshay Sir for teaching us! Glad to see the season 2 of Namaste JavaScript😍 Callbacks are the functions passed to another function as an argument and it helps to write asynchronous operation in JS. When we are using callbacks, we face two issues: 1. Callback hell - When we have multiple dependent callbacks it will form nested callbacks, code will be unmaintainable and unreadable. This nested callback structure is also called Pyramid of Doom. 2. Inversion of control: We pass the callback function within another function, we are blindly trusting where we don't know whether that function will ever execute our callback function or not, it's so risky for a developer. We loose the control of our program.

  • @sarthakbhatia7888
    @sarthakbhatia7888 Жыл бұрын

    The two problems that we faced in callbacks are:- 1) Callback Hell: Asynchronous operations in JavaScript can be achieved through callbacks. Whenever there are multiple dependent Asynchronous operations it will result in a lot of nested callbacks. This will cause a 'pyramid of doom' like structure. 2) Inversion of control: When we give the control of callbacks being called to some other API, this may create a lot of issues. That API may be buggy, may not call our callback and create order as in the above example, may call the payment callback twice etc.

  • @hemantagarwal5095

    @hemantagarwal5095

    Жыл бұрын

    Do you mean interns only write bugs ? 😅

  • @Prashantsingh896

    @Prashantsingh896

    Жыл бұрын

    “No interns were harmed while writing this comment“

  • @yogeshyts

    @yogeshyts

    Жыл бұрын

    @@Prashantsingh896🔷🔷😂😂😂😂

  • @yogeshyts

    @yogeshyts

    Жыл бұрын

    bhai ne to aankh bnd krke ratta maar liyaa interns bhi dal diyo defination m

  • @AbhishekKumar-lk2ei

    @AbhishekKumar-lk2ei

    Жыл бұрын

    bawa

  • @typecjelly
    @typecjelly Жыл бұрын

    I'm still going through the first Namaste Javascript playlist and visited the channel for that. Seeing the season 2 was a very pleasant surprise.

  • @VandanaSharma-ec6zl
    @VandanaSharma-ec6zl Жыл бұрын

    sir i am a trainee at function up and recommending this series to every other trainee i encounter. I really admire your efforts. Can't thank you enough.

  • @bikashneupane2
    @bikashneupane218 күн бұрын

    2 problems using callback: 1. Callback hell: This is where there are multiple nested callback functions which makes code difficult to maintain/read. 2. Inversion of control: When we call another callback, we give control of our function to that callback function and we cannot be sure if that callback function will ever be executed or not. PS. Understanding alot from Namaste JS course. Thanks alot

  • @jagrutsharma9150
    @jagrutsharma9150 Жыл бұрын

    Glad that this series has started again.🤩🤩 Things learned: 1.) "Time, tide and JS waits for none" 2.) Callback function enables us to do async programming in JS. We use this for some functions that are interdependent on each other for execution. For eg: Ordering can be done after adding items in cart. So we pass cb functions as argument to functions which then call the cb function passed. However this causes some problems: a.) Callback Hell: When a callback function is kept inside another function, which in turn is kept inside another function. (in short, a lot of nested callbacks). This causes a pyramid of doom structure causing our code to grow horizontally, making it tough to manage our code. b.) Inversion of control: This happens when the control of program is no longer in our hands. In nested functions, one API calls the callback function received but we don't know how the code is written inside that API and how will it effect our code. Will our function be called or not? What if called twice? What if it has bogs inside it? We have given control of our code to other code. 3.) We will see the solutions in next episode.

  • @benedictbenny1117

    @benedictbenny1117

    Жыл бұрын

    be more of a teacher's pet😇🤭

  • @jagrutsharma9150

    @jagrutsharma9150

    Жыл бұрын

    @@benedictbenny1117 🖖

  • @kshitijnath
    @kshitijnath Жыл бұрын

    The two Problems with callbacks 1) Callback Hell: Callbacks are useful when we want to perfrom some extra functionality with our already existing function for example passing an error handling callback to our already created function, BUT when callbacks within themselves start taking in other functions as callbacks then that mess that you are left with is known as the Callback Hell leading to unreadable code, hence unmaintanable code. 2) Inversion Of Control: when we pass a function to other function as a callback we are giving the called function the control of whether to even call it or not or maybe call it in a wrong context. For example a success callback is called when an error occours inside a called function (maybe due to human error while writing the code for called function), this type of giving up of control over our functions is known as inversion of control.

  • @maheshshirate2834
    @maheshshirate283419 күн бұрын

    I learnt from this class - 1) importantance of callback We can give function inside a function, It helps to us to call function after 1st one exicuted 2) issues of using Callback - Callback hell ( lengthy code ) - lose control of code (dependate code)

  • @inderpreetsingh4176
    @inderpreetsingh4176Ай бұрын

    H/W is done: Well explained the 2 issues mainly occur in callback 1. Callback Hell: When a situation where one callback inside a callback is being called. 2. Inversion of control: where we do not have control on the callback function

  • @romibohmra8881
    @romibohmra8881 Жыл бұрын

    2 issues with callback: 1) Callback hell: If we have one callback function inside another callback and that is inside another callback and so on, then this is known as the callback hell. 2) Inversion of control: When we create a callback function, we give control to another function to call this callback function. We give the control of our piece of code to some other function, this is known as inversion of control. PS: Really loved the video and so happy that you're back with another season. Looking forward to the future episodes.

  • @vishaltanna8198
    @vishaltanna8198 Жыл бұрын

    Great to see you back!! ❤ Thank you so much for making it free for us. Cons of call back 1. Difficulty to understand / maintain code (specially if was done by our ancestors) 2. Completely, Loose control over our code..

  • @RakeshSahu-cr9ks
    @RakeshSahu-cr9ks Жыл бұрын

    Thank you so much Akshay, you're the reason why we love Javascript as it is! The two problems we generally face when using callbacks are: 1. Callback hell -> When there is a dependency of 1 function in another, we pass the function as a callback function, but in many cases this might lead to passing callbacks into another callback functions so on and so forth, creating codes which are difficult to maintain, and read. 2. Inversion of control: When we pass our callback function into another function, we essentially loose the control over our callback function, as it is controlled by the function which is calling it and not us. Which is quite a big challenge, and might create several performance issues as we don't know how that function is behaving when called etc..

  • @BhavyaYadati99
    @BhavyaYadati99 Жыл бұрын

    I never watched any learning series with this excitement for a long time and without taking break. Thanks a lot Akshay Saini!!. Waiting for your next.

  • @shubhamjain8130
    @shubhamjain8130 Жыл бұрын

    I completed the first series yesterday, and getting the 2nd season just next day is super surprise.😁 I am able to see the difference in myself while solving the coding questions and quizzes of javascript now after completion of 1st series. One of the best series on javascript core concepts.

  • @syedarfeen9526
    @syedarfeen9526 Жыл бұрын

    Hi Akshay, I'm very thankful to you I have cleared my interview by just watching your Namaste JavaScript season 1 I'm Pakistani and I really appreciate your efforts. Thank you once again 🤩🤩 Divided by border United by YT channel 😅

  • @akshaymarch7

    @akshaymarch7

    Жыл бұрын

    Wow, congratulations Syed. ❤ Love from India 🇮🇳♥️

  • @vikashkumar-ug6cm

    @vikashkumar-ug6cm

    Жыл бұрын

    @@akshaymarch7 hello sir, someone was fooling me, by being you . asked me to invest in bitcoins. i had a doubts on javascript and node.js thats how he connect with me

  • @rohitkr.6408

    @rohitkr.6408

    Жыл бұрын

    @@vikashkumar-ug6cm Yah same here

  • @nid30

    @nid30

    Жыл бұрын

    @@akshaymarch7 When is your next video on Promises getting uploaded...??? Eagerly waiting and can't keep calm anymore!!!! 🤩🤑🤩🤑🤯😵🤯😵

  • @saiadusumilli2064
    @saiadusumilli206411 күн бұрын

    callback : passing a function as an argunment to the another function.this process continues as their callbacks many callbacks inside .which increases code horizontally and vertically.it is difficult to maintain code .this is called callback hell inversion: when function is passed an argument to the another function which is a callback .here we lose control of our function to another function. we don't know what's happenning behind scene. so this is inversion of control i love the way you are teaching❤🔥

  • @sergiisechka1993
    @sergiisechka1993 Жыл бұрын

    1. multiple calls inside each other make code unmaintainable and some sort of unpredictable 2. you're giving the control of function to another function that calls another function thank you Akshay! You are one of the best

  • @madhukesh_gaming_vlogging6300
    @madhukesh_gaming_vlogging6300 Жыл бұрын

    The learning vibe comes in last , the kind of Music you take in last gives us another level of vibe ❤️❤️

  • @sanchitraghuwanshi5759
    @sanchitraghuwanshi57597 ай бұрын

    Sir by just watching namaste Javascript series I cracked my technical interview. Thank you so much sir for making this amazing content.

  • @mayurjain2889
    @mayurjain2889 Жыл бұрын

    Great to see you back, I was eagerly waiting for your season 2 and many thanks to keeping it FREE !! Two problems we face for callbacks 1. Asynchronous calls can be achieved from concept called "callback" but when there are series/nested dependent callbacks one after another , which makes our code unmaintainable and leads to Callback Hell 2. Now we are achieving the asynchronous operation using callback. But when we give a responsibility to execute our written function to some other function as a callback, that moment we completely loose the control of our code and this is call as "Inversion of Control". Which is very dangerous

  • @amankushwaha8180
    @amankushwaha8180 Жыл бұрын

    please complete this series your teaching style is awesome

  • @thetechrakshit
    @thetechrakshit Жыл бұрын

    Dear Akshay, thank you very much for all your efforts. Through this comment I am trying to express my gratitute from the very bottom of my heart. Your videos, especially NJ series has helped me learn so many thing in depth. I have eventually cleared interviews also. Although I have no tech degree, but I managed to crack multiple company rounds and finally going to a software engineer. Thank you very much for all the initiative you have taken. I am sure, many others like me has received massive help from your content. Once again, thank you very much. Lots of love and respect. Keep up your good work.

  • @akshaymarch7

    @akshaymarch7

    Жыл бұрын

    Congratulations brother, and thank you so much for your beautiful comment. ♥️

  • @nishantgautam5742

    @nishantgautam5742

    Жыл бұрын

    We love you, Akshay Bhaiya. I am also from different background which was in Electrical Engineering. But at the time of the covid pandemic, I decided to switch my field to IT Sector. I was completely on the scratch level. But after attending your playlist I feel that there is no need for any pre-background of coding. You are one of the best teacher in my life. You have done your mission that you made us fall in love with javascript. 🤩🤩🤩😍😍

  • @gauribrahme1836
    @gauribrahme18363 ай бұрын

    Your 2 more minutes are never 2 minutes, but love the way you teach and make things understand, which makes us want to watch more. Thanks😀

  • @himalayashri_arts
    @himalayashri_arts9 күн бұрын

    HomeWork: When a function is passed as an argument in some another function so that it can be called back anytime when needed, it becomes callback function. Advantages: Asynchronous programming is possible because of callbacks only Two Problems with Callback: 1. Callback Hell: When a function takes a callback func and that callback func also takes another callback func and this way it nested series of callback functions and code started to grow horizontally instead of vertically, this phenomena is called Callback Hell. 2. Inversion of Control: When we passed a callback function in another function, Now we will depend on the main function to call the callback function and thats how we lost control in our code. This is called Inversion of control. LOVE YOUR VIDEOS SIR 🥰♥

  • @oqant0424
    @oqant0424 Жыл бұрын

    was struggling with callback since last 3 days.....came to your video...finally understood everything in just 15 mins....thanks for making it so simple

  • @kirtikhohal5025
    @kirtikhohal5025 Жыл бұрын

    not only your explanation is amazing, the example that you chose for explaining that e-commerce was so swift to understand, thanks for existing.

  • @sankalparora9374

    @sankalparora9374

    9 ай бұрын

    Thanks for Existing... I like it.

  • @SanketDeb
    @SanketDebАй бұрын

    The two issues we face while using callback - 1.Callback Hell - When a function is passed as an argument to another function and this process continues making each callback dependent to the other and so forth, this leads to the horizontal growth of the code instead of vertically making the code unreadable and unmanageable, this is known as callback hell. 2. Inversion of control - When we pass one callback function is passed as an argument to another callback, we effectively give away the control of our code to the function upon which it is passed as an argument, in this we don't know the behind the scene of the other callback and don't have any control over it, this situation is known as inversion of control. Thank You for teaching with so much enthusiasm.

  • @sarveswaranthangaraj912
    @sarveswaranthangaraj912 Жыл бұрын

    I like how excited you are, bro! Please keep it up :) First, it's Callback hell, and it was named appropriately. When we try to solve interdependent tasks using callback functions, we end up creating a nested callback and when we try to dry run the code or to update it, we'll ending praying Luci to save us. The second is, just a repetition of a mistake that we do in daily life, yeah losing or giving our control to someone else, trusting them out of nowhere. I was surprised to see even codes aren't excluded from trust issues. (don't trust "blindly", especially someone or something digitally)

  • @abinashshasini577
    @abinashshasini577 Жыл бұрын

    Hi Akshay, I'm very thankful to you I'm a frontend developer having 2 yrs+ experience whenever a recruiter calls me to schedule an interview first thing that comes to my mind is your playlist 🤣🤣🤣 Thank you for this kind of informative video.

  • @SaifiCode

    @SaifiCode

    Жыл бұрын

    @Text me on Telegram sure karta hu

  • @krishmabhatia696
    @krishmabhatia696 Жыл бұрын

    Please release more videos on JS covering topics like inheritance,this keyword and other key topics in JS.Once again thanks for making this wonderful series free of cost for all :)

  • @shubhis2466
    @shubhis2466 Жыл бұрын

    From basic JS to advanced, I have learned it all in a better way through your NJ series. Thank you so so much. ☺

  • @owensechrist1315
    @owensechrist1315 Жыл бұрын

    Love this channel!!! I've been working my way up to async, can't wait for your explanation!! Homework: 1. When we pass a callback function to an API, we lose control of the execution of our code since we don't know if/how that function will be executed and handled outside our own code. 2. If our code is trying to accomplish something that is dependent on a certain flow of executions, we can end up with callbacks inside of callbacks inside of callbacks, which makes it difficult to understand what is happening.

  • @iamshahid
    @iamshahid Жыл бұрын

    Two problems we face while using callbacks: 1) When we are dependant on our previous operation to run the current one, we use callbacks. If we use callbacks multiple times in a same function that grows horizontally instead of verticall this is called a callback hell. The structure is called callback hell. It is very6 hard to maintain. 2) When we pass a function as a callback, basically we are dependant on our parent function that it is his reponsibility to run that function. This is called inversion of control beacuse we are depenadant on that function. What if parent function stopped working, what if it was developed by another programmer or callback runs two times or never run at all.

  • @shilpesaxena8783
    @shilpesaxena8783 Жыл бұрын

    Two issues of callbacks are: - 1) Callback Hell: callback inside callback and a lot of nested callbacks and the code becomes unmaintainable. 2) Inversion of Control: lose control of the program, which means we gave out our function to some other function and we don't know whether the function will ever execute our function or not.

  • @bhavikadwivedi9879
    @bhavikadwivedi98799 ай бұрын

    Callback have two issues : 1. CALLBACK HELL : In this process function call another function and that function call some another function and this process continues multiple time and which make it unreadable and unmaintainable and grows the code horizontally instead of vertically 2. INVERSION OF CONTROL: In this process we loose the control where the call back function is being executed or what is happening behind the scenes . Thanks for the good explanation and clearing the doubt why we need promises

  • @rohinisunitha8101
    @rohinisunitha8101 Жыл бұрын

    Hi Akshay, the two issues of call backs are 1) callback hell: we are creating many nested callbacks in code that we cannot handle .2) inversion of callback: we are depending on callback so much that we don't have control over the code .

  • @saoudahmedkhan2549
    @saoudahmedkhan2549 Жыл бұрын

    Dear aksha.. its seems like i was listening a story. And its all goes in my mind, thanks for helping mid level devs.. love from Pakistan

  • @sruthimohan5243
    @sruthimohan5243 Жыл бұрын

    Two Issues with the Callback , 1. Callback hell: Having multiple callback functions under a module , making the code unmaintainable and there is always a chance of breaking functionality. 2. Inversion of control : Giving the control of an important sequence to a function which might fail to execute the callback function and we might not know if that would do the needful .

  • @anandsuryawanshi9911
    @anandsuryawanshi99119 ай бұрын

    superb explination ! Two problems are : i. call back hell : due to nested calling of callback functions code starts to grow horizontally insted of vertically so this happens. ii. Inversion of control : we can loose control over our code as we pass our important code / functions / any other snippit to some api or any function by trusting that api that it will run properly and will work as expected.

  • @mahirvahmad2149
    @mahirvahmad2149 Жыл бұрын

    Thank you for the great class. 1.Tthe main issue of callBack is callBack hell. call one function into another function will help you if there is only one call back function, but chain of call back functions will lead to call back hell that's called pyramid doom. 2. Inversion of Control : as name says the control of the function might be inversion some cases and it will affect the overall performance of the app/website

  • @amitperane1302
    @amitperane1302 Жыл бұрын

    Its 1AM Feeling soo sleepy and even I know Callback Hell... But still watching bcoz it's Akshay Saini....😍😍😎😎

  • @anshikapathak4422
    @anshikapathak4422 Жыл бұрын

    Hello aksay everyone is recommended you please keep making everything on js and it's my request don't disappear. We need you here on you tube on a serious note. I want to be a developer but you will be here journey will be so easy for us. Please 🥺

  • @dinukadhaneshanimathangaweera
    @dinukadhaneshanimathangaweera Жыл бұрын

    Hi Akshay.. Thank you so much for the amazing explanation. Two problems of the callbacks are, 1. call back inside another call back makes nested callbacks which make the code unmaintainable. 2. inversion of control - we lose the control of functionality since control of the functionality is blindly given to another function.

  • @palma675
    @palma675 Жыл бұрын

    I have been struggling to understand callback function but this genius here explained in a way that even a baby would be able to understand it, so thank you very much. New subscriber!

  • @shilpisinha7877
    @shilpisinha7877 Жыл бұрын

    Time ,tide and javascript waits for none, 😂 really funny😂😂 appreciate your way of presenting things , your videos really helps in logic building

  • @jatinparashar5929
    @jatinparashar5929 Жыл бұрын

    Don't put one video and just take such a huge break. It'll be better if you shoot a few and then upload them so that the waiting time isn't this long. Your talent and knowledge is amazing but this management and engagement is poor. You shouldn't have announced in the first place if it's not even beginning properly

  • @diviyasundarajamoorthy7250
    @diviyasundarajamoorthy7250 Жыл бұрын

    Dear Akshay, I love your energy and thank you so so much for explaining super clearly. Keep up the great work.

  • @utuberyder
    @utuberyder Жыл бұрын

    Understood it, Loved it. Two problems: 1. Callback hell -> Pyramid of dooms -> Unreadable / Unmaintainable code 2. Inversion of control -> While passing a function as callback we are trusting some unknown API for our callback execution which might or might not happen, which is dangerous.

  • @anejasahil
    @anejasahil Жыл бұрын

    Two problems that we face due to the callbacks are:- 1) Callback hell: when we use have to do a lot of tasks one after other using asynchornous operations , we use callbacks but as we have to do a lot of asynchronous operations we have to write to write so much callbacks insdie one another.This situation is called callback hell. THis is because the code loses its readability and we are writing a tower of dom 2) Inversion of control: using callbaclks means that we are passing our functions to another fucntion , lets say a api , how this api is maintained can't be known by us , so trust the higher order function that it will take the callback and call it properly , which can't be the case.Hence we wer are trafereing the conrol of our code to some other code.Hence we are losing the control of our application , so this is referd as inversion of control

  • @atulbihari7494
    @atulbihari7494 Жыл бұрын

    "Callback means, i will call you back later" 1. A callback calling another callback and again another callback calling another callback i.e nested of callback, in other word one callback output pass as an input of another callback so if one callback fails then breaks it down all the other callback after that. 2. Definitely it will unreadable and un maintainable of code and difficult to understand.

  • @krishmabhatia696
    @krishmabhatia696 Жыл бұрын

    Thanks Akshay for providing such wonderful series that too free of cost.Please create series on nodejs as well explaining express middleware and other nodejs concepts that can help us become full stack developer.

  • @mithileshpatel4398
    @mithileshpatel4398 Жыл бұрын

    Thanks Akshay, these videos are very helpful for us. I am out of words for your appreciation, and having a happy and smiling teacher like you is cherry on the cake. Keep smiling always.❤❤😇😇

  • @jayashrishinde9692
    @jayashrishinde9692 Жыл бұрын

    This is going to be more addictive than Netflix series🤩🎉 loved the content. Thanks man.

  • @neerajshende8373
    @neerajshende8373 Жыл бұрын

    Callbacks: Super important feature in JavaScript that helps us achieve asynchronous behaviour in JavaScript. There are 2 problems that comes with callbacks: 0. Callback Hell: It is the code structure where there is callback function, inside other callback function, inside other callback function..... And our code starts growing horizontally instead of vertically. This is also called as 'pyramid of doom'. Because of this type of structure, our code becomes really difficult to maintain and manage. 1. Inversion of control: When using callbacks, we often loose control of our callback function and relies on the other function to execute our callback function. The function on which we rely to execute our callback function can be buggy, or can have different issues which prevent our callback function to get called.

  • @TheRealVegapunk
    @TheRealVegapunk8 ай бұрын

    So the 2 problems with callback are that: 1. To take advantage of the callback and make JS asynchronous, we use callback functions in multiple block levels and inside other functions on multiple levels which grows the code in a non-maintainable way. This also leads to the second problem with using callbacks mindlessly in JS which is... 2. Inversion of Control, how would you like your code to be executed? Would you trust a stranger with your belongings? If not, why trust some random function with your precious code to execute it later as callback? Makes sense right. Trusting a function which you know not much about to make a call to your callback function is a gamble for sure. Know the code or lose the control. This has been callback hell and inversion of control explained by me. Thanks 😁

  • @deltechdiaries5907
    @deltechdiaries5907 Жыл бұрын

    very few people understant js in depth, and out of those few, very few explain those concepts in detail. you are one of those few

  • @MujammilShaikh4091
    @MujammilShaikh409110 ай бұрын

    Thank you @Akshay Saini, for the incredible 'Namaste Javascript' playlist!🔥 It played a pivotal role in helping me secure an 8LPA job as an Associate Web UI Developer🎉. I am truly grateful for the valuable content you provided 🙏

  • @Rafi-cu6gf

    @Rafi-cu6gf

    10 ай бұрын

    Ohh where are you working

  • @vimalkumar-zz6pn
    @vimalkumar-zz6pn Жыл бұрын

    callback hell: callback is a way to write asynchronous code in javaScript but the problem of call back hell arises when we nest a callback inside other callback. Due to which a pyramid of doom get created and it make our code very hard to manage. Inversion of Control: Due to the interdependence of one callback on another we might loose control on our code. Thanks @Akshay Saini bhai ❣❣

  • @shadabhussain147
    @shadabhussain147 Жыл бұрын

    Sir, I love how you teach. You make every concept crystal clear in our heads. Please create videos on NodeJs also.

  • @sahersiddiqui6925
    @sahersiddiqui6925 Жыл бұрын

    Hello Akshay, I have been watching you series of javascript videos and it helps me a lot in understanding it also in clearing the interviews. So now I will explain the two problems with the callbacks. 1. Callback hell which means callback inside callback that will make our code complex. 2. Inversion of control means to lose the control over the code as we are dependent on the function to call our callback function which is very risky while writing the code.

  • @MicroRishi
    @MicroRishi Жыл бұрын

    2 issues: 1. Callback hell - Calling external methods / api in nested order. It leads to vertical expansion of code which is very hard to maintain. 2. Inversion of control When passing functions in function (method), we hand over the control of the passed functions, i.e. the method will control the logic for function execution, which is very deadly ☠️ Hope to find solutions in episode 2 🤩🇮🇳

  • @siemen_subbaiah
    @siemen_subbaiah Жыл бұрын

    I think season 2 will be mostly focused on the asynchronous behaviour of JavaScript.

  • @prasadsawant7
    @prasadsawant7 Жыл бұрын

    1) We create a lot of callbacks inside other functions, which makes our code grow horizontally and it seems like Pyramid of Doom. i.e. Callback Hell 2) By passing multiple callbacks into multiple functions respectively, we lose our control over program. Meaning after passing callback to other function then it is upto that other function when it'll call the callback or maybe it won't even call the callback i.e. Inversion of Control

  • @namishnandverma4558
    @namishnandverma45589 ай бұрын

    First reason is it makes to grow code horizontally instead of vertical. Second reason is blind trust on another function , that will execute and take care of execution.

  • @shubhammuniyal4381
    @shubhammuniyal4381 Жыл бұрын

    I think this video was made 6 days ago and now it's gone public. Anyways great video

  • @nehruclasses9303
    @nehruclasses93038 ай бұрын

    so far I understood about callback from this video, 1. Callbacks are very important concept in javascript. Callbacks are very helpful in handling asynchronous programming. 2. Call back hell is that which is called by another function. the risk of using call back is that if the parent function has any error, the child function won't execute.

  • @bhagyashreekhairnar683
    @bhagyashreekhairnar68311 ай бұрын

    Thank you once again for a superb video !!! a very imp topic and made simple by you!! 1. liked your video 2. HW answer: a. call back hell - nested callbacks tend to increase the length of the code horizontally instead of vertically; the code thus become hard to read and there are more chances of dveloping a buggy code and b. Inversion control - the control to call the callback is given to another function and this inversion of control is risky as we rely on function to call the callback.

  • @soumyaranjan580
    @soumyaranjan5808 ай бұрын

    The explanation was so Good that i forced myself to make notes :- So the two issues of callback are-: 0-callback inside another callback makes our code very much unreadable and unmaintainable which also makes our code length increase horizantly which is called as Callback hell. 1-losing control over a function(inversion of control) :-passing function inside another function makes us lose the control over it which sometimes can be risky.

  • @niteshwadhwani18
    @niteshwadhwani18 Жыл бұрын

    Time , Tide and JavaScript waits for no one but every one is waiting for new episode to come out.

  • @hiteshsuthar1097
    @hiteshsuthar1097 Жыл бұрын

    Callback is a function that is executed after another function has completed its execution. Or, Callback is a function which is passed as an argument in another function and invoked inside the outer function to complete some action or operation. When it is called immediately, it's called as Synchronous Callback Function. And when it is called after completion of an asynchronous operation, it's known as Asynchronous Callback Function. Callbacks are often used for handling asynchronous operation, their output depends on outer resources and takes some time for it. There are 2 issue mainly when using callbacks. a) Callback Hell b) Inversion of Control

  • @ruchish4
    @ruchish4 Жыл бұрын

    I am gonna make Namaste js course compulsory in my organisation. I have also seen in the interviewers candidates answering using your course. You are doing amazing work. I wish your videos reach to more and more people, and we all become better devs.

  • @kavitagupta790
    @kavitagupta7907 ай бұрын

    I learnt in this video Call back Hell - when a functions passed in another function argument.. Many callbacks function in another function. Creating nested callback and the code become messy to understand it's a call back hell Inversion of control: function inside another function and giving to control to some another function is risky - it's inversion of control

  • @luka583
    @luka5832 ай бұрын

    the only one who clarified the callbak for me..miillion thank you. You are Genius.

  • @nishiths7255
    @nishiths72553 ай бұрын

    two issues with the using the callback 0) callback-hell: it is basically an nested functions which are embebbed within the parameter . as it could increase the complexcity of the code 1)inversion of control: here in this the function having like authority over the other function with or without our control as it could be riskier while dealing with codebase

  • @shreyakolekar4059
    @shreyakolekar40597 ай бұрын

    Thank you Akshay Saini for this amazing content! Super excited for season 2. More power to you Sir!

  • @saqibidrees4655
    @saqibidrees4655 Жыл бұрын

    I learned this from video. 1- we can achieve asynchronous programming using callbacks. 2- we can ran into callback hell, Mean Deep nested callback calls. 3- we also loose control over function call when we pass function as a callback. Because now other function has control over it. I may never call this function or call it twice. we can't be assure about it.

  • @omkardeshmukh1942
    @omkardeshmukh19422 ай бұрын

    Thank you so much for the video. So today we learned about 2 things, first how callbacks are important and second why they cause problems in programming. 1. Why callbacks are important? Callback provides a way to handle async operations in javascript like reading a file, loading an image, etc. Callbacks are executed after the async operation is completed. This makes it possible to still have control after an async operation. That's why they are super important 2. why callbacks can be evil? There are mostly two reasons for this namely: i) Callback hell: Sometimes async operations are dependent on one another. The way to handle them is callbacks. Due to this reason, as we saw in the example above, code becomes very complicated and hard to understand. That's why we should avoid callback hell. ii) Inversion of control: We somehow depend on the earlier function to call our callback function, but we cannot be sure whether the function is correctly calling our function or not calling our function or calling our function twice. We also need to avoid this problem.

  • @balajidurshetti3250
    @balajidurshetti3250 Жыл бұрын

    I thought of stopping learning javascript before I saw namaste javascript session 1 but now I am more confident about javascript thanks, Akshay.

  • @berd23
    @berd23 Жыл бұрын

    Thank you Akshay for your hard work which helps a lot of developers, you are one of the best teachers

  • @patelrajkumarnareshkumar8156
    @patelrajkumarnareshkumar8156 Жыл бұрын

    Akshay bhaiya is back with a bang! Issues with callbacks 1) It reduces the code readability, as over time it becomes a tedious task to rework those codes. 2) single point of failure.

  • @ParusStyleCorner
    @ParusStyleCorner Жыл бұрын

    Sir please upload the next episode of this series( how to overcome the Callback hell i.e promises), i watched many videos on promises but still does not get clear idea how promises helps to deal with the callback hell problem. I always watch n refer your videos whenever want to clear my doubts n to have better understanding of the concepts. i feel blessed that i came across your channel. Thanks a lot for your time and the efforts u give in all the videos. you are AHHH...MAZINGGGG

  • @akshaykale5150
    @akshaykale5150 Жыл бұрын

    First of all, thank you Akshay sir for this new season 🙏❤️. I was waiting for this .... I humbly request you, to create some videos on OOP with JS 🙏🙏🙏

  • @honeykhra
    @honeykhra Жыл бұрын

    You are one of the best coding teachers I have come across Simple explanation of complex topics

  • @shortme9374
    @shortme9374 Жыл бұрын

    1. callback Hell- When we have call back inside another callback in nested format that too a lot of times. it may impact maintainability and readability. 2. Inversion of control- we are passing our call back to something that may not be reliable for the execution on our hero call back function. Akshay Bhai hai to sab mumkin hai.

  • @kaminithakur6587
    @kaminithakur6587 Жыл бұрын

    Just finished first season 1 and love it a lot more than the Netflix web series 😄. Thank you so much it helped me a lot .

  • @floatingcloud5955
    @floatingcloud5955 Жыл бұрын

    I was so lucky i Just started to learn JS 3 days ago , accidentally clicked eventloop video end up watching all the episodes of season 1. in this 3 days i spend most of time in learning js and reading article about js it look like i am addicted to Learning js i can't stop myself.

  • @aatifshaikh2088
    @aatifshaikh2088 Жыл бұрын

    issues with callback 1. Callback hell : unmaintainable nested callbacks 2. Inversion of control : loosing control of a code by making it dependent on other execution Akshay, you are a hero :)

  • @shanmugampalani9374
    @shanmugampalani93746 ай бұрын

    The two issues we face while using callbacks are : 1) Callback hell. 2) Inversion of Control. Thanks for explaining it precisely

  • @ritikgoyal3903
    @ritikgoyal39038 ай бұрын

    1. Callback Hell When we have a large code base and in this there are so many APIs which are dependent on one after the other then this situation makes it callback hell and it is unreadable and unmaintainable. It is also known as pyramid of doom 2. Inversion of control It means loose the control of code while using callbacks means when there are so many callback function one inside other and it gives the control of one function to another and it don't know what is happening behind the seen then this situation is called inversion of control Thank you so much for providing such type of videos which is very helpful for me for placement preparation and i learn all the thing from basic to deep. Please providing the videos for node.js to make it more strong.

  • @sarthakkrishna3492
    @sarthakkrishna3492 Жыл бұрын

    Bhai yaar kya hi padhaate ho aap! Thank you so much for coming back!

  • @629_nishantghadigaonkar3
    @629_nishantghadigaonkar3 Жыл бұрын

    The two problems with Call back are : 1. Call back hell : Here we pass one call back function into another and that call back into another, thus creating an unreadable and unmaintanable code. This is also known as pyramid of doom. 2. Inversion of control : Here we pass call back into another function. This leads to loss of control of our code. Control moves to the other functon where we used call back. Thank You Akshay !

  • @nikhilkamble3034

    @nikhilkamble3034

    Жыл бұрын

    thanks

  • @kedarnath435
    @kedarnath435 Жыл бұрын

    thanks Akshay for the new Season. Your every single step is helping JavaScript community knowledgeable, stronger and conceptually advance. The common issue of Callback: 1. Callback Hell: this is basically nested functions with different purposes, which are dependent on each other. That makes our code error prone and unmaintainable. 2. Inversion: this make one function to dependent on other. In this case if any error appears in one function that may impact our all the dependent methods and it sometimes tedious to find the issue. From which piece of code creating issue. Kindly correct me if I made any mistake. Thanks once again for your contribution for the JS community.