Most voted "arrow-functions" questions
Questions about the syntax of the Ecmascript2015 (ES6) compact function called "Arrow functions" due to the use of "=>".
Learn more…12 questions
Sort by count of
-
10
votes3
answers598
viewsWhat is the difference between keys and parentheses in an Arrow Function in Javascript?
What is the relevant difference between keys ({ }) and parentheses (( )) in a return of a function? const example = () => ( ... ); Versus: const example = () => { ... };…
javascript function characteristic-language syntax arrow-functionsasked 4 years, 9 months ago novic 35,673 -
5
votes2
answers104
viewsDifficulty in interpreting Arrow functions that return Arrow functions in Javascript
I was seeing Javascript dependency injection and came across the following syntax: () => () => {} I know that () => {} is a Arrow Function which, in short, is a different way of creating a…
-
3
votes1
answer413
viewsIs it possible to create an object/class/interface that represents a Function signature?
Everything already works as expected in my code. What I want is to make it more verbose, making the signatures of the method more self-explanatory (I know I can use Docs comments for this, but I…
-
2
votes0
answers1259
viewsWhat is Arrow Function and when to use?
I’m having a question, I’m studying ES6 but I don’t really understand what the Arrow Function replaces, I researched and I saw that it’s the function this. I would like to know better with an…
-
2
votes1
answer89
views$(this) in Arrow Function returns different element
See that the $(this) in each case below points to a different element: 1º) Function: $("button").click(function(){ $("input").val(function(){ return $(this).val(); }); }); ↑ ↑…
-
2
votes1
answer49
views"Arguments" doesn’t work on an Arrow Function?
I’m doing a simple test with Arrow Function, but when I use the arguments he returns Uncaught Referenceerror: Arguments is not defined How can I use the parameters? const teste = () => { for(i in…
-
0
votes1
answer28
viewsForce class in React to use Arrow Function with Eslint
How do I make an error pro Eslint when someone in the project uses functions within a class that need bind instead of an Arrow Function
-
0
votes1
answer31
viewsHow to put a Function Arrow in on onclik
How do I place an Arrow function in an onClik since it is named after the variable? The following is an example of:…
-
0
votes0
answers13
viewsDoubt about this and Arrow Function
Good afternoon, I have a question about this and Arrow Function. For example: const user = { age: 32, halfAge(){ return this.age/2; }, doubleAge: () => 2 * this.age; }…
-
0
votes0
answers37
viewsfunction does not work within setInterval within another function
Hello, I started studying Javascript a little while ago, and I always get excited when I go to mess with kk functions, I’m trying to create a stopwatch with JS and HTML, but when I create the…
-
-1
votes1
answer134
viewsError in call of Arrow function on button - React Native
I want to call the clearMemory function by the "AC" button but I’m not getting it. Follow the reference code: export default class App extends Component { state = { displayValue: '0', } addDigit = n…
-
-2
votes1
answer76
viewsHow to declare a function in the form of Arrow Function?
How to declare the function below as Arrow Function in javascript Ecma 6 and then call it? Currently I use it like this and do not know how it leaves working without the "Function" in front.…