Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

in javascript what is =>

Posted on 2015-02-23
3
Medium Priority
?
29 Views
Last Modified: 2015-04-25
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
Comment
Question by:stargateatlantis
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40625776
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
 

Accepted Solution

by:
stargateatlantis earned 0 total points
ID: 40734500
This is ES6 functions
0
 

Author Closing Comment

by:stargateatlantis
ID: 40743796
The question wasn't answered.  The arrow functions are part of javascript ECMA 6
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question