• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 30
  • Last Modified:

in javascript what is =>

In javascript what does this mean => when using in context.

For example

 const run = {
    "←": ([x, y]) => [x - 1, y],
    "→": ([x, y]) => [x + 1, y],
    "↓": ([x, y]) => [x, y - 1],
    "↑": ([x, y]) => [x, y + 1] 
  };

Open in new window

0
stargateatlantis
Asked:
stargateatlantis
  • 2
1 Solution
 
Rainer JeschorCommented:
Hi,
as far as I know this is not "pure" Javascript as this operator "=>" is not specified.

But Typescript has such constructs to manage expectations and to provide some kind of type safe programming functionality.
Please have a look here in the specs:
http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf

HTH
Rainer
0
 
stargateatlantisAuthor Commented:
This is ES6 functions
0
 
stargateatlantisAuthor Commented:
The question wasn't answered.  The arrow functions are part of javascript ECMA 6
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now