This video was really good at explaining the straight forward array. You ended the video with a possible application, but not how to build said application being that the Yelp example would use either an array of objects or nested array. If you have an array of businesses with various businesses hours and you're looking for businesses that are open at a particular (filtered) time, the script would have to pass through the array of businesses and then through the subset of hours, correct? Will you be making a video on how to do just that or am I missing something? Either way, like I mentioned, really good video.
i think here more like objects of array will be used for businesses......and in callback function using conditions checking firstly time if time matches need then check if business open or close //object of arrays will look something like this // const array = [ {status:open , hour: 8PM to 10PM} , {status:close , hour:10PM to 1AM} ]; //Now checking condition in callback function if(ArraYElement.hour > specificed time) { if(ArrrayElemenr.open == "open" ) {return true} }; Not really sure if it is correct but this is what i think
Thanks for this tutorial and great explanation. Please note: 0 is not a positive number or negative number. At 0:13 you mentioned you want to return only the positive numbers but your filter expression is "n => n >= 0", instead of "n => n > 0"
I am so shocked that you replied after 3 years😂 You should look into the topic of positive and negative zeros. Apparently if you divide any number with -0 it tends to -Infinity and if you divide by +0 it tends to +Infinity and that is the main reason behind having two zeros.
Dear Mosh. I am seeking a tutorial on Modular or Class Design in Javascript, do you have these lectures available for free or do you have a course regarding the different types of Modular/Class design in Javascript ?
Thanks! What VS Code extension shows you filer method's syntax? And could you explain more complex case with full stack of filter's parameters - counter, array and thisObj?
Sir, suppose I have script like this: var leaveFilter = data.filter(data => {return data[1 == "Annual Leave" || data[1] == "Vacation leave" || data[1] == "Sick" || data[1] == "Important leave"}); How if I want make some iteration, or loop perhaps, so I just have to make that filter in array like this: filters = [ "Annual Leave", "Vacation leave", "Sick", "Important leave"] Which later I want that I could use that filters variable to do some iteration/loop in filter method above. Could you help to break this problem?
And if I have a lot of characters inside a array, for example ['a', '~', 'p', '8', '/' ] and I only want the letters and the numbers? Does this method works?
What if I selected multiple criterions, for example, on Yelp you click on 'Open Now' and also wanted to filter based on cost, and now I just wanted to see objects with low cost that are open right now? What is the best execution for this or would I have to add another array method to support the filter array in this algorithm?
Bro, I love your videos. I'm barely learning JS, and I must say that out of the many Tubers I watch, you're the one I understand best!
best realtime example
tanks a lot sir.i watched a video that has 30 minutes and i don't understand that concept but i understande your video in 3 minuts
Thanks, I live in Belarus and your lesson helped me )
This video was really good at explaining the straight forward array. You ended the video with a possible application, but not how to build said application being that the Yelp example would use either an array of objects or nested array. If you have an array of businesses with various businesses hours and you're looking for businesses that are open at a particular (filtered) time, the script would have to pass through the array of businesses and then through the subset of hours, correct? Will you be making a video on how to do just that or am I missing something? Either way, like I mentioned, really good video.
I would really want to know that as well, its sounds a bit more complex
i think here more like objects of array will be used for businesses......and in callback function using conditions checking firstly time if time matches need then check if business open or close
//object of arrays will look something like this
// const array = [ {status:open , hour: 8PM to 10PM} , {status:close , hour:10PM to 1AM} ];
//Now checking condition in callback function
if(ArraYElement.hour > specificed time)
{
if(ArrrayElemenr.open == "open" )
{return true}
};
Not really sure if it is correct but this is what i think
Thanks for this tutorial and great explanation.
Please note: 0 is not a positive number or negative number. At 0:13 you mentioned you want to return only the positive numbers but your filter expression is "n => n >= 0", instead of "n => n > 0"
Javascript has 2 kinds of zeros positive and negative.
@@shibshankarpadhy783 well I didn't know that. I was commenting in terms of mathematical context
I am so shocked that you replied after 3 years😂
You should look into the topic of positive and negative zeros. Apparently if you divide any number with -0 it tends to -Infinity and if you divide by +0 it tends to +Infinity and that is the main reason behind having two zeros.
@@shibshankarpadhy783 hehehehe, I'm still alive... covid-# still hasn't taken me ;-)
Thanks for the info
As my fist week of studying JS, Ive been stuck on this all day, You gave me the solution I was looking for ! Thanks a lot ;)
are you now a js devoleper
Mosh you are the best tech teacher . PhD of Software engineering
first video but clearer than my udemy current course
You're the man, Mosh.
Hi Mosh i am a ui developer with 2years of experience could you please suggest on filter more tutorial, i am also getting confused with arrow function
Excellent explanation Thanks
Thank you!! Very informational. What kind of theme you are using in VS Code? Looks cool
All time champ:) keep up the great work
Love this! Thank you for making it look easy!!!
Thank You Very Much for clearly explaining
Dear Mosh. I am seeking a tutorial on Modular or Class Design in Javascript, do you have these lectures available for free or do you have a course regarding the different types of Modular/Class design in Javascript ?
only one word thank you very much
Thanks! What VS Code extension shows you filer method's syntax? And could you explain more complex case with full stack of filter's parameters - counter, array and thisObj?
Incredibly helpful!
Awesome video. Danke Schoen.
Amazing mosh
What themedo you use?
Short & sweet.
thanks for the tip.
Nice video my man, keep it up.
Sir, suppose I have script like this:
var leaveFilter = data.filter(data => {return data[1 == "Annual Leave" || data[1] == "Vacation leave" || data[1] == "Sick" || data[1] == "Important leave"});
How if I want make some iteration, or loop perhaps, so I just have to make that filter in array like this:
filters = [ "Annual Leave", "Vacation leave", "Sick", "Important leave"]
Which later I want that I could use that filters variable to do some iteration/loop in filter method above. Could you help to break this problem?
ask this on facebook dude. Many javascript groups that can help, wish i could help but am learning too.
@@andresviveros3994 thanks Man. Good idea :)
And if I have a lot of characters inside a array, for example ['a', '~', 'p', '8', '/' ] and I only want the letters and the numbers?
Does this method works?
Thanks a lot bro!
Thanks a lot for this
thanks man
youre very useful
Amazing. Love it
Awesome ❤
Nice sir
Excellent
Thank you!
love you, thanks!
What if I selected multiple criterions, for example, on Yelp you click on 'Open Now' and also wanted to filter based on cost, and now I just wanted to see objects with low cost that are open right now? What is the best execution for this or would I have to add another array method to support the filter array in this algorithm?
I don't think he's gonna help you with that.
you're the best
so good, always great
excellent , subsribed for life ♥ ♥ ♥ ♥
thanks so much
What’s the name of this plugin, which shows popup with info of “filter”?
It's not a plugin, it comes by default on Visual Studio Code.
Tnx mn keep going
Awesome
Thank you :-)
Y'all already know most of us are here to pass the coding boot camp assessment. lol
wow man
Pure
ang galing mong kalbo ka
Ravish kumar official
Nonsense function , source of a bunch of errors
i love your content but hate the way you promote yourself by these ads
Thank you so much.