Solved

in javascript what is =>

Posted on 2015-02-23
3
25 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Suggested Solutions

Title # Comments Views Activity
PHP Web Development 6 67
make control visible based off other control value 7 44
Building JSON/JQuery Results Display 11 52
Submitting form with no refresh at the end 2 32
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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

737 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