Hello Everyone today i will discuss few concepts which you should know before moving onto React JS.
Let's get started...
ES6 Arrow Funct...
For further actions, you may consider blocking this person and/or reporting abuse
These two things are not the same, in some cases the differences may not matter, but:
this
of the enclosing scope in which they are defined meaning they can't be used in prototypes or classes.Arrow functions are incredibly useful, but they are also not actually shorter to declare if they are multiline and you are declaring the function as a variable to be called. However, you could define a
map
or afilter
function with the wholefunction
style shenanigans, if fact you used to have to, now that's nasty and arrow functions really shine in this area.Actually I wrote they are doing the same thing , not they are same thing, what i meant is they are returning the number in the parameters
That's why i attached a link for the complete reference of the topic
A lot of stuff here is not related to ES6 at all
Which one's?
map, filter, reduce is ES5. Ternary operator has been there from the start.
Yeah but we can use these with ES6 features for more shorted code
Well, if we want shorter code using ES6 features, we could rewrite your debounce:
I'm not entirely sure why you wrapped
fn
in another function in the original?Yeah The title should be ES6 combined with Javascript
Higher order functions are just a programming concept made possible in languages where functions are treated as values, as JS does and always has.
But we can combine higher order function with ES6 features to make it more shorter that's i put it there
I think I should say ES6 with javascript combine
You might want to clarify on the React part. I think you should add relevant React snippets if you want to name your posts as so.