{"comment":{"url":"https://api.github.com/repos/RobCoIndustries/pipboy/comments/14961937","html_url":"https://github.com/RobCoIndustries/pipboy/commit/b7309aeb480b7fd82491f9465c7a31d7eda57f03#commitcomment-14961937","id":14961937,"user":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars.githubusercontent.com/u/836375?v=3","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"position":26,"line":30,"path":"app.js","commit_id":"b7309aeb480b7fd82491f9465c7a31d7eda57f03","created_at":"2015-12-14T15:40:55Z","updated_at":"2015-12-14T15:40:55Z","body":"We're using [ECMAScript 6 (ES6)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla), the modern dialect for JavaScript in 2015. What you're looking at is an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), an anonymous function that lexically binds `this`. It is similar to the `lambda` of Python except that it can handle a full function instead of just expressions. In fact, here's an equivalent from Python to JavaScript for an arrow function with an expression body:\r\n\r\n```python\r\nlambda x: x + 2\r\n```\r\n\r\n```javascript\r\nx => x + 2\r\n```\r\n\r\nSince we're using electron-compile in main, we're able to transpile (or compile) from ES6, CoffeeScript or even TypeScript over to ES5 (well supported previous version of JavaScript).\r\n\r\nMore ES6 resources:\r\n\r\n* [ES6 Features](https://github.com/lukehoban/es6features#readme)\r\n* [Node ES6](https://nodejs.org/en/docs/es6/)\r\n* [ES6 Features - lexical `this`](http://es6-features.org/#Lexicalthis)"}}