{"id":720,"date":"2014-07-23T16:27:47","date_gmt":"2014-07-23T16:27:47","guid":{"rendered":"https:\/\/gosqeng.test\/?p=720"},"modified":"2019-11-28T12:05:03","modified_gmt":"2019-11-28T12:05:03","slug":"looking-forward-to-the-future-of-javascript","status":"publish","type":"post","link":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript","title":{"rendered":"Looking forward to the future of JavaScript"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/static.gosquared.com\/images\/liquidicity\/14_07_23_es6_js_01.jpg\" alt=\"The future of Javascript\" \/><br \/>\nHere at <a href=\"https:\/\/www.gosquared.com\" target=\"_blank\" rel=\"noopener noreferrer\">GoSquared<\/a>, we&#8217;re massive fans of JavaScript. Pretty much everything we code is written in JavaScript, be it on the backend (using Node.js) or on the frontend.<\/p>\n<p>JavaScript is a changing language, though, and there&#8217;s some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.<\/p>\n<p>ES6 isn&#8217;t due to reach final specification status for a while yet, but some browsers have already started implementing some of the new features. ES7 is still <em>way<\/em> off in the future, but there are some interesting new features planned.<\/p>\n<h2>How to use these features now<\/h2>\n<p>Browser support for ES6 features is <a href=\"http:\/\/kangax.github.io\/compat-table\/es6\/\">somewhat patchy at best<\/a> at the moment, but it&#8217;s possible to write using ES6 and 7 and &#8220;transpile&#8221; it using Google&#8217;s <a href=\"https:\/\/github.com\/google\/traceur-compiler\">Traceur Compiler<\/a> to the JavaScript-of-today that&#8217;s understood by browser and Node.js. Traceur can be used as a <a href=\"https:\/\/github.com\/google\/traceur-compiler\/wiki\/Using-Traceur-with-Node.js\">drop-in replacement for <code>require<\/code> in Node<\/a>, or you can compile to browser-compatible javascript, either <a href=\"https:\/\/github.com\/google\/traceur-compiler\/wiki\/CompilingOffline\">directly<\/a> or using tools like <a href=\"https:\/\/www.npmjs.org\/package\/grunt-traceur\">grunt<\/a> or <a href=\"https:\/\/www.npmjs.org\/package\/gulp-traceur\">gulp<\/a>.<\/p>\n<h2>Our favourite new JavaScript features<\/h2>\n<p>There are <a href=\"https:\/\/github.com\/google\/traceur-compiler\/wiki\/LanguageFeatures\">a lot<\/a> of features available in ES6 and through Traceur, but here are a few of our faves, with some real(ish)-world examples.<\/p>\n<h3>Arrow Functions<\/h3>\n<p>Arrow functions replace <code>function(args){ return expression; }<\/code> with <code>(args) =&gt; expression<\/code> or <code>function(args){ \/* do something *\/ }<\/code> with <code>(args) =&gt; { \/* do something *\/ }<\/code>. Additionally they also use lexical <code>this<\/code> scoping (i.e. they inherit the <code>this<\/code> from the scope in which they&#8217;re written, rather than depending on where and how they&#8217;re called), which is particularly useful if you want to avoid using <code>bind<\/code> all over the place in event handlers and callbacks.<\/p>\n<p>They are <em>particularly<\/em> useful in the <code>argument\u00a0=&gt;\u00a0returnExpression<\/code> form, especially if you&#8217;re using libraries like <a href=\"http:\/\/d3js.org\">D3<\/a> which use a lot of small functions. For example:<\/p>\n<pre><code class=\"language-javascript\">someCircles\n  .data(data, d =&gt; d.id)\n  .sort((a, b) =&gt; a.score - b.score)\n  .attr('transform', d =&gt; `translate(${d.x}, ${d.y})`)\n  .attr('r', d =&gt; d.radius);<\/code><\/pre>\n<p>Much tidier than having <code>function<\/code> and <code>return<\/code> all over the place. The above example also uses a <strong>template literal<\/strong> which is a neat way of interpolating values into strings without lots of quote marks and concatenation.<\/p>\n<h3>Rest and Spread<\/h3>\n<p>Rest and spread are like inverses of each other. Rest parameters allow you to use <code>function(arg1, arg2, ...allTheRest){ ... }<\/code>, and all arguments after the first two will be placed as elements of <code>allTheRest<\/code> (which is actually a proper array, rather than a confusing arguments object). The spread operator allows you to expand an array to formal parameters, so you can call a function like <code>someFunction(...arrayOfParameters)<\/code>.<\/p>\n<p>Here&#8217;s an example of using rest parameters to implement something similar to jQuery&#8217;s <code>$.merge<\/code>:<\/p>\n<pre><code class=\"language-javascript\">function merge(into, ...others){\n  var src;\n  while (src = others.shift()) {\n    Object.keys(src).forEach(k =&gt; into[k] = src[k]);\n  }\n  return into;\n}<\/code><\/pre>\n<p>Spread is particularly useful also for doing things like <code>Math.max(...bigArrayOfNumbers)<\/code>, or for example on the backend with Express using <code>app.get('\/', ...middlewareChain, routeHandler)<\/code><\/p>\n<h3>Object literal shorthand and computed property names<\/h3>\n<p>Object literals have been improved to allow you to write, for example, <code>{\u00a0x,\u00a0y\u00a0}<\/code> if you already have variables called <code>x<\/code> and <code>y<\/code> (instead of <code>{\u00a0x:\u00a0x,\u00a0y:\u00a0y\u00a0}<\/code>).<\/p>\n<p>Computed property names allow you to specify properties in object literals based on expressions, one place we&#8217;ve found that particularly useful for front-end development is in handling CSS with browser prefixes:<\/p>\n<pre><code class=\"language-javascript\">\/* var width, height, x, y = foo; *\/\n\n\/\/ use a shared variable to store browser-prefixed version\n\/\/ of the transform property (e.g \"WebkitTransform\" or \"transform\")\nvar cssTransformProperty = getPrefixed('Transform');\n\n$('&lt;div&gt;').css({\n  width, height,\n\n  [cssTransformProperty]: `translate(${x}px, ${y}px)`\n});\n\n\/\/ This is basically equivalent to:\nvar obj = { width, height };\nobj[cssTransformProperty] = `translate(${x}px, ${y}px)`;\n$('&lt;div&gt;').css(obj);<\/code><\/pre>\n<h3>Destructuring assignment<\/h3>\n<p>Destructuring assignment is a way of assigning several variables at once.<\/p>\n<p>You can destructure arrays:<\/p>\n<pre><code class=\"language-javascript\">var [ rootItem, subItem, ...allTheRest ] = url.split('\/');\n\n\/\/ equivalent to:\nvar arr = url.split('\/');\nvar rootItem = arr[0], subItem = arr[1], allTheRest = arr.slice(2);<\/code><\/pre>\n<p>You can destructure objects (including shorthand):<\/p>\n<pre><code class=\"language-javascript\">\/\/ utils = { doThis: function(){}, doThat: function(){}, ... }\n\nvar { doThis, doThat, etc } = utils;\n\n\/\/ now use doThis()<\/code><\/pre>\n<p>You can also destructure inside function arguments:<\/p>\n<pre><code class=\"language-javascript\">var arrayOfPeople = [ { name: 'bob', email: 'bob@company.com' }, ... ];\n\n$('&lt;ul&gt;').html(\n  arrayOfPeople\n    .map(({ name, email }) =&gt; `&lt;li&gt;${name} (${email})&lt;\/li&gt;`)\n    .join('')\n);<\/code><\/pre>\n<h3>Block Binding (let and const)<\/h3>\n<p>Let&#8217;s face it, we&#8217;ve all done something like this before:<\/p>\n<pre><code class=\"language-javascript\">for(var i = 0; i &lt; arr.length; i += 1){\n  setTimeout(function(){\n    \/\/ something with arr[i], which always gets executed with i = arr.length\n  }, 100);\n}<\/code><\/pre>\n<p>Obviously there are workarounds, most of which involve messy immediately-invoked functions. ES6 introduces two new keywords, <code>let<\/code> and <code>const<\/code> which are scoped to their local <em>block<\/em> rather than just function scope that <code>var<\/code> uses. Now you can do something like this:<\/p>\n<pre><code class=\"language-javascript\">for(let i = 0; i &lt; arr.length; i += 1){\n  setTimeout(function(){\n    \/\/ something with arr[i], which works!\n  }, 100);\n}<\/code><\/pre>\n<h3>Async Functions<\/h3>\n<p>Async functions are still <em>very<\/em> experimental. They&#8217;re lined up for inclusion in ES7, but there&#8217;s plenty of scope for them to change before being finalised.<\/p>\n<p><strong>NB: the examples below are correct at the time of writing, but syntax may well change in the future<\/strong><\/p>\n<p>Async functions uses Promises to allow you to write asynchronous code without having to deal with callbacks or Promises directly.<\/p>\n<p>A function written with <code>async function(){ ... }<\/code> will return a <code>Promise<\/code> that either resolves to the return value of the function&#8217;s body, or rejects if the function throws an error.<\/p>\n<p>There&#8217;s a new keyword, <code>await<\/code>, which can <em>only<\/em> be used inside an <code>async function<\/code>, which when given a promise, will evaluate (asynchronously) to the resolved value of the Promise.<\/p>\n<p>For example:<\/p>\n<pre><code class=\"language-javascript\">function timeout(ms){\n  return new Promise(resolve =&gt; setTimeout(resolve, ms));\n}\n\nasync function asyncValue(value){\n  await timeout(500);\n  return value;\n}\n\n(async function(){\n  var value = await asyncValue(42);\n  \/\/ half a second later, value now has the value 42\n\n  doSomethingElse();\n})();<\/code><\/pre>\n<p>Async functions are particularly useful on the backend, where you may be fetching data asynchronously.<\/p>\n<pre><code class=\"language-javascript\">function getConfig(id){\n  return new Promise(() =&gt; {\n    \/\/ imagine fetchSomeData is some nodey-style err-first-callback function\n    fetchSomeData(id, (err, data) =&gt; err ? reject(err) : resolve(data));\n  });\n}\n\nexpressApp.get('\/', async function(req, res, next){\n  var conf = await getConfig(req.session.id);\n  return res.render('index', conf);\n});\n\n\/\/ You can also use Promise.all or Promise.race to await multiple promises\n\nexpressApp.get('\/list', async function(req, res, next){\n  var configs = await Promise.all([ 1, 2, 3 ].map(getConfig));\n  res.render('list', { configs });\n});<\/code><\/pre>\n<p>It&#8217;s probably not advisable, however, to use async functions in frontend code: Traceur compiles them to fairly complex state machines, which can get very large very quickly. <a href=\"http:\/\/google.github.io\/traceur-compiler\/demo\/repl.html#%2F%2F%20Options%3A%20--asyncFunctions%0A%0Afunction%20timeout(ms)%7B%0A%20%20return%20new%20Promise(resolve%20%3D%3E%20setTimeout(resolve%2C%20ms))%3B%0A%7D%0A%0Aasync%20function%20asyncValue(value)%20%7B%0A%20%20await%20timeout(500)%3B%0A%20%20return%20value%3B%0A%7D%0A%0A(async%20function()%20%7B%0A%20%20var%20value%20%3D%20await%20asyncValue(42)%3B%0A%20%20%2F%2F%20half%20a%20second%20later%2C%20value%20now%20has%20the%20value%2042%0A%20%20%0A%20%20doSomethingElse()%3B%0A%7D)()%3B\">Here&#8217;s that first example compiled<\/a> just to show how big it can get.<\/p>\n<h2>But wait, there&#8217;s more!<\/h2>\n<p>This is far from an exhaustive list. I&#8217;ve merely touched on the features that we use most here at GoSquared. There&#8217;s plenty more, including classes, modules, generators, array comprehension, for-of loops, Maps, Sets, Proxies, and way more that I haven&#8217;t mentioned. <a href=\"https:\/\/github.com\/google\/traceur-compiler\/wiki\/LanguageFeatures\">This page<\/a> documents all the features currently supported by Traceur, and <a href=\"https:\/\/github.com\/google\/traceur-compiler\/wiki\/LanguageFeatures\">here&#8217;s<\/a> a quick one-page rundown of everything that&#8217;s proposed.<\/p>\n<p>Obviously these features may change before the stable release so don&#8217;t take anything written here as certain. I would love to hear about your favourite features in the comments or discuss anything about specific implementation. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here at GoSquared, we&#8217;re massive fans of JavaScript. Pretty much everything we code is written in JavaScript, be it on&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1452],"tags":[],"class_list":["post-720","post","type-post","status-publish","format-standard","hentry","category-engineering"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.6 (Yoast SEO v19.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The future of JavaScript - GoSquared Engineering<\/title>\n<meta name=\"description\" content=\"JavaScript is a changing language, though, and there&#039;s some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Looking forward to the future of JavaScript\" \/>\n<meta property=\"og:description\" content=\"JavaScript is a changing language, though, and there&#039;s some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript\" \/>\n<meta property=\"og:site_name\" content=\"GoSquared Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GoSquared\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-23T16:27:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-11-28T12:05:03+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.gosquared.com\/images\/liquidicity\/14_07_23_es6_js_01.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@floopily\" \/>\n<meta name=\"twitter:site\" content=\"@GoSquared\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"JT\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\",\"name\":\"GoSquared\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"sameAs\":[\"https:\/\/instagram.com\/gosquaredteam\",\"https:\/\/www.linkedin.com\/company\/go-squared-ltd.\",\"https:\/\/www.facebook.com\/GoSquared\",\"https:\/\/twitter.com\/GoSquared\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"contentUrl\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"width\":1270,\"height\":250,\"caption\":\"GoSquared\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"name\":\"GoSquared Blog\",\"description\":\"Turn visitors into customers.\",\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage\",\"url\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript\",\"name\":\"The future of JavaScript - GoSquared Engineering\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage\"},\"datePublished\":\"2014-07-23T16:27:47+00:00\",\"dateModified\":\"2019-11-28T12:05:03+00:00\",\"description\":\"JavaScript is a changing language, though, and there's some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.gosquared.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Looking forward to the future of JavaScript\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage\"},\"author\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\"},\"headline\":\"Looking forward to the future of JavaScript\",\"datePublished\":\"2014-07-23T16:27:47+00:00\",\"dateModified\":\"2019-11-28T12:05:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage\"},\"wordCount\":828,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\",\"name\":\"JT\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"caption\":\"JT\"},\"description\":\"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.\",\"sameAs\":[\"https:\/\/twitter.com\/floopily\"],\"url\":\"https:\/\/www.gosquared.com\/blog\/author\/jt\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The future of JavaScript - GoSquared Engineering","description":"JavaScript is a changing language, though, and there's some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript","og_locale":"en_US","og_type":"article","og_title":"Looking forward to the future of JavaScript","og_description":"JavaScript is a changing language, though, and there's some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.","og_url":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript","og_site_name":"GoSquared Blog","article_publisher":"https:\/\/www.facebook.com\/GoSquared","article_published_time":"2014-07-23T16:27:47+00:00","article_modified_time":"2019-11-28T12:05:03+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.gosquared.com\/images\/liquidicity\/14_07_23_es6_js_01.jpg","twitter_creator":"@floopily","twitter_site":"@GoSquared","twitter_misc":{"Written by":"JT","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.gosquared.com\/blog\/#organization","name":"GoSquared","url":"https:\/\/www.gosquared.com\/blog\/","sameAs":["https:\/\/instagram.com\/gosquaredteam","https:\/\/www.linkedin.com\/company\/go-squared-ltd.","https:\/\/www.facebook.com\/GoSquared","https:\/\/twitter.com\/GoSquared"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","contentUrl":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","width":1270,"height":250,"caption":"GoSquared"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/www.gosquared.com\/blog\/#website","url":"https:\/\/www.gosquared.com\/blog\/","name":"GoSquared Blog","description":"Turn visitors into customers.","publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage","url":"","contentUrl":""},{"@type":"WebPage","@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage","url":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript","name":"The future of JavaScript - GoSquared Engineering","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage"},"datePublished":"2014-07-23T16:27:47+00:00","dateModified":"2019-11-28T12:05:03+00:00","description":"JavaScript is a changing language, though, and there's some particularly exciting new features in the process of being specified for ECMAScript (the official specification behind JS) versions 6 and beyond.","breadcrumb":{"@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gosquared.com\/blog"},{"@type":"ListItem","position":2,"name":"Looking forward to the future of JavaScript"}]},{"@type":"Article","@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#article","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage"},"author":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef"},"headline":"Looking forward to the future of JavaScript","datePublished":"2014-07-23T16:27:47+00:00","dateModified":"2019-11-28T12:05:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#webpage"},"wordCount":828,"commentCount":0,"publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#primaryimage"},"thumbnailUrl":"","articleSection":["Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gosquared.com\/blog\/looking-forward-to-the-future-of-javascript#respond"]}]},{"@type":"Person","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef","name":"JT","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","caption":"JT"},"description":"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.","sameAs":["https:\/\/twitter.com\/floopily"],"url":"https:\/\/www.gosquared.com\/blog\/author\/jt"}]}},"wps_subtitle":"What we\u2019re excited about in ES6 and beyond","_links":{"self":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/comments?post=720"}],"version-history":[{"count":0,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/media?parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/categories?post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/tags?post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}