JavaScript JavaScript and the DOM Making Changes to the DOM Getting and Setting Text with textContent and innerHTML

jons phyos
jons phyos
Pro Student 35 Points

what does () => on this javascript?

i don't know why he use this () => on the code, any know know what this does?

1 Answer

Steven Parker
Steven Parker
182,309 Points

That's part of "arrow function" syntax.
It indicates the beginning of the definition of an anonymous function that takes no parameters.

For more details, see the MDN page on Arrow Functions.