Questions tagged as 'arrow-functions'

1
answer

$ (this) na arrow function returns different element

Notice that the $(this) in each case below points to a different element: 1st) Function: $("button").click(function(){ $("input").val(function(){ return $(this).val(); }); }); ↑ ↑ ¯¯¯...
asked by 27.03.2018 / 00:47
1
answer

Is it possible to create an object / class / interface that represents a signature of a function?

Everything already works as expected in my code. What I'm wanting is to make it verbose, making method signatures more self-explanatory (I know I can use Doc comments for this, but I'd also like to use TypeScript types) and can be better valid...
asked by 18.07.2017 / 14:17
1
answer

"arguments" does not work in an arrow function?

I'm doing a simple test with arrow function , but when I use arguments it returns    Uncaught ReferenceError: arguments is not defined How can I use the parameters? const teste = () => { for(i in arguments){ retur...
asked by 01.07.2018 / 23:08
0
answers

What is Arrow Function and when to use it? [duplicate]

I have a question, I am studying ES6, but I do not understand much what the Arrow Function replaces, I researched and saw what the function is this . I would like to know better with an example without and with Arrow Function, and to kn...
asked by 19.01.2018 / 23:46