Could someone please explain how exactly '=>' works in JavaScript? I know it is shorthand for an anonymous function, but don't quite understand what it does technically
@keezee the MDN docs are pretty good on this! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
@keezee Yes. But it has some side-effects that you have to be aware of, like the `this` not being bound to the function. But yea in 99% it's a nicer/faster way of writing anonymous functions :p
@keezee Yes. It was added in ES6/ES2015 so it's only supported in modern browsers (read: not IE at all) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Browser_compatibility
@Eramdam Fucking. IE.
@keezee haha. To be fair IE11 is going to be unsupported very soon (or is it already? I don't remember) so you should be fine :p
@keezee If you've been missing out on JS for the past ~2years then you're in for a treat because there was A LOT going on :D
@keezee Oh boy! Well imho it's probably the best time to learn JS because much of the newest features make it feel like a decent language on many aspects :p
@keezee But yeah, as a rule of thumb. MDN is a goldmine and should be your #1 source for answers in most cases :p
@Eramdam Thanks so much! Where do you work at SF?
@keezee I'm a front-end engineer at https://frontapp.com
@Eramdam just gave Front a quick glance and read. Awesome write up from YC. That's huge! Grats homie 👊
@keezee Thanks man! I've been at this company for 2yrs (we were ~5 in an office in Paris at the time!) so, yeah, we're doing alright I guess :D
@Eramdam Fuck yah you are!! Killings da game
rapid moving gif Afficher plus
@Eramdam is this new to JS? I feel it's becoming more and more frequently used in code I read