2
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 example without and with Arrow Function, and know how the code looks.
I wonder if someone could help me with this ?
Is using
TypeScript
?– Marconi
Arrow Function
translating into English are Functions of Arrows It is only a means of writing functions in a more compact way.– Marconi
Example in Typescript: The function Let func = Function (name:string): string { Return
My name is: ${name}
}. Translated into Arrow Function: Let func = (name:string) =>My name is: ${name}
– Marconi