Higher Order Functions Interview Question| Modern Javascript 2021

  Рет қаралды 9,356

Nisha Singla

Nisha Singla

2 жыл бұрын

Higher order functions are those function which takes a function as a argument or return a function as output.
Functions are the first class citizen in javascript, it means function act like any other type in javascript. So we can assign function to a variable, we can pass function as a argument to another function , a function can return a function, As function are first class citizens because of that Higher order functions are possible in javascript.
A Function that takes another function as argument, that function is HIGHER ORDER FUNCTION and that argument which we have passed to Higher order function is called Callback functions.
In this video, I have explained how you should write your functions so that you can optimised your code and can clear the coding round during your interview.
Support my channel so that I can reach to wider audience. Please share it in your network 🙏
Connect with me on social platform:
Facebook: / angularjs4beginners
LinkedIn: / nisha-singla-82407aa0
Instagram : / passion4code
For more such interesting videos, please subscribe to my channel and stay connected.
#javascript #NishaSingla #higherorderfunctions

Пікірлер: 43
@ecevetri9545
@ecevetri9545 Жыл бұрын
Clear Explanation thank you!👍
@MrJohncenaraw
@MrJohncenaraw 2 жыл бұрын
Very useful..i am happy understand my long time doubts. Thank you
@NishaSingla
@NishaSingla 2 жыл бұрын
Glad to know 😀
@urvishavachhani7623
@urvishavachhani7623 2 жыл бұрын
Thank you Nisha for simply awesome explanation. Your deep copy and shallow copy video helped me in my interview. please make more and more videos for front end interviews :)
@NishaSingla
@NishaSingla 2 жыл бұрын
Glad to know ..😀😀thanks
@ramadevi-xe4be
@ramadevi-xe4be Жыл бұрын
excellent explanation nisha
@deepakpawar5593
@deepakpawar5593 2 жыл бұрын
Good Content
@NishaSingla
@NishaSingla 2 жыл бұрын
Thanks
@saishree1000
@saishree1000 2 жыл бұрын
Thanks nisha its very useful
@iamsouravganguli
@iamsouravganguli Жыл бұрын
👍 nice
@ashishnayak2666
@ashishnayak2666 2 жыл бұрын
Clear explanation
@NishaSingla
@NishaSingla 2 жыл бұрын
Thanks 😊
@RakeshKumar-br3rg
@RakeshKumar-br3rg 2 жыл бұрын
Plz explain pure and impure functions. Thanks for your great videos.
@NishaSingla
@NishaSingla 2 жыл бұрын
Sure
@user-ph1xq4lp2e
@user-ph1xq4lp2e Жыл бұрын
Your video are very helpful to me. thanks a lot. ............explanation should be twice instead of square.
@durgaprasadbrahmandlapally3721
@durgaprasadbrahmandlapally3721 2 жыл бұрын
Hi Nisha, your explanation next level, I thought instead of citizen, it's object.
@NishaSingla
@NishaSingla 2 жыл бұрын
Thanks 😊
@ankitaggarwal5845
@ankitaggarwal5845 9 ай бұрын
Please upload more videos of Advance Javascript.
@narendra7556
@narendra7556 2 жыл бұрын
Nisha , it was really helpful tutorial pls make one complete playlist on interview javascript these thing
@NishaSingla
@NishaSingla 2 жыл бұрын
Sure thanks
@hi-yi7en
@hi-yi7en 2 жыл бұрын
Tq
@asanmohamed7281
@asanmohamed7281 2 жыл бұрын
@Nisha singla could you pls do “Joseph’s problem “ using recursive in java script
@satyasanghavi6791
@satyasanghavi6791 Жыл бұрын
Hi nisha, your videos are good. Can you please make videos on oops in javascript
@akrammohammed3581
@akrammohammed3581 2 жыл бұрын
Please give me some project ideas to implement rxjs in angular..
@zenchoudhary3849
@zenchoudhary3849 2 жыл бұрын
1:31 second Syntex is wrong you forget to write =>
@durgaprasadbrahmandlapally3721
@durgaprasadbrahmandlapally3721 2 жыл бұрын
Nisha do video on life cycle hock
@Dev-fk5rn
@Dev-fk5rn Жыл бұрын
It would be much obliged by us if upload notes for the same as well..🎉
@31sar
@31sar 2 жыл бұрын
Just a correction , square is number * number
@shubhampatil5935
@shubhampatil5935 Жыл бұрын
why everyone does not give real life usecase of hof?
@IraquiRizwanVlogs
@IraquiRizwanVlogs 2 жыл бұрын
Nice video ma'am. But square means number*number . Not multiple with 2. 😉
@NishaSingla
@NishaSingla 2 жыл бұрын
Yes, you are right... add a subtitle to correct that.. Thanks to bring it in my notice... :)
@IraquiRizwanVlogs
@IraquiRizwanVlogs 2 жыл бұрын
Ma'am please make video on practical coding issue.
@IraquiRizwanVlogs
@IraquiRizwanVlogs 2 жыл бұрын
How big companies write some pices of codes? What are their parameters for a specific language . Such as c#, javascript, how they write?
@ProtikPC_pro_indigo
@ProtikPC_pro_indigo 2 жыл бұрын
@@NishaSingla good content; Thanx for explaining this concept; As I see and understand this --> this helps write clean code. Not just very long walls of JS/ES6 code that we often end up with, in projects, but isolating, segregating pieces like individual/independent building blocks; I suppose this promotes easier testability of the same as well like unit tests etc. That, plus the point you mentioned yourself --> making it more reusable *** func. logic should be d[i]*d[i] as it's not double but square.
@NishaSingla
@NishaSingla 2 жыл бұрын
Absolutely…. You mentioned it very well And regarding formula , I added in caption the correct one.. 😊😊
@SingajogiSudhakar
@SingajogiSudhakar 11 ай бұрын
Array.prototype.repEachElement = function(callback) { return this.reduce((newArray, element) => { newArray.push(callback(element)); return newArray; }, []); } let data = [1,2,3,4,5,6]; const op = data.repEachElement((el) => el); console.log(op);
@mdnasiransari2039
@mdnasiransari2039 2 жыл бұрын
In function x argument is fn but inside the function you are doing fn() I didn't not understand why you are doing this
@NishaSingla
@NishaSingla 2 жыл бұрын
Because I am passing y to x function x(y) and if you check here y is also a function which I am referring with fn argument inside x function , so I am calling fn() , it means it will execute y() function and that is Higher Order function( function passing as argument to other function) I hope its clear
@mdnasiransari2039
@mdnasiransari2039 2 жыл бұрын
@@NishaSingla thank you for your clarification now crystal clear.
@bharatmoger9965
@bharatmoger9965 2 жыл бұрын
Please help me on this : write a function which will display all the values with 'value' key in es6 let multiLevelData = { value: 2, data: [{ value: 3, data: [{ value: 4, data: [{ value: 6, data: [] }] }, { value: 5, data: [] }] }] }
@denisugiartodev
@denisugiartodev Жыл бұрын
function recursivePrintData(d) { console.log(d.value); if (d.data.length === 0) return; d.data.forEach((val) => { recursivePrintData(val); }); } recursivePrintData(multiLevelData);
@nazrealam3774
@nazrealam3774 2 жыл бұрын
square of 10 is 100, how come 20, that is multiplication of 2.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 115 МЛН
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 15 МЛН
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 2,7 МЛН
Higher Order Functions - JavaScript Tutorial
10:10
ColorCode
Рет қаралды 62 М.
What is Recursion | Javascript | Real World Examples
26:35
Nisha Singla
Рет қаралды 12 М.
Higher Order Functions in JavaScript Explained Simply
9:55
Teddy Smith
Рет қаралды 7 М.
16.5: Higher Order Functions in JavaScript - Topics of JavaScript/ES6
16:21
JavaScript Higher Order Functions & Arrays
34:56
Traversy Media
Рет қаралды 980 М.
High Order Array loops | chai aur #javascript
34:12
Chai aur Code
Рет қаралды 116 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 115 МЛН