{"componentChunkName":"component---gatsby-theme-teklog-src-templates-post-tsx","path":"/how-to-start-using-modern-javascript-syntax-within-minutes","result":{"data":{"site":{"siteMetadata":{"siteUrl":"https://blog.tekmi.nl","author":{"name":"Teklog","avatar":"/img/tekmi-icon.svg"}}},"blogPost":{"frontmatter":{"title":"How to start using modern Javascript syntax within minutes","slug":"how-to-start-using-modern-javascript-syntax-within-minutes","series":null,"date":"2017-07-21","datePretty":"21 July, 2017","coverImage":{"childImageSharp":{"fixed":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB1ElEQVQ4y42SXyjDURTH752VF39m2Pht9+63IY9e5UEeeVMelfLgQSNaSpS8kJIiySMPaiWlFEXag4hSlNQahmExyp/5N9tv+x333v1Jsdmp2zm/c8/vc77n9zsIpbGPc5LynxcE8/jrkuLNRYPIP7rNKGtLwt69BEX9VMTPHiKS7FlTXaHNHvoT9uWjOTxmCnvYCQdPSJNQ6qPasUHd/9A0MLt6S4EfFis/oRPDWUDZS+jtLAE+J3a4swBrxGGR6I2Axl5OSCO/D/uoxr1Vnh4WuqRcJU6otcN9HAa3lhhTBG9eElXi0MjraVwpa46Tk/0yNqqGe6aghitjowA8y8q60wDjQzoVgjKEr2gYAhZgtUHPtlTM6x+OzfhPIP8WTJW4hFfZsbZggM62PLWrPT820q+Djta86N2RmUNV/6GpRdQFLPjIlWFs1i0Vn+1KjrnJYlhdKFWHHYXKQHcB+PZNHNgsYKoNO2dL0sOeEn8LIla0s2IU4wNU9k6PFEFDXS64lowAYIvDgrKWSGIRUEaFyRWATyuaGdUL6M2BqW9r2QjePUnAYn6qTdYfbJT9v9wpaMiaygFUVXCvXFM8P6XPHvYLCjZUX5srYu+uhCEkZ4R9Ay4ICMEjdot8AAAAAElFTkSuQmCC","width":1000,"height":625,"src":"/static/087d4c586e614bdac4b8f492bbf2ec11/31987/modern_js.png","srcSet":"/static/087d4c586e614bdac4b8f492bbf2ec11/31987/modern_js.png 1x"}}},"author":null,"authorAvatar":null},"timeToRead":6,"excerpt":"Introduction Everyone, including browsers, got used to the JavaScript syntax from 90-ties. But time passes by and JavaScript becomes more and more…","html":"<h2 id=\"introduction\" style=\"position:relative;\"><a href=\"#introduction\" aria-label=\"introduction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h2>\n<p>Everyone, including browsers, got used to the JavaScript syntax from 90-ties. But time passes by and JavaScript becomes more and more popular, so ECMA, the committee behind the changes in JavaScript, woke up and started to release new features.</p>\n<p>The most recent major update to the specification was approved on <a href=\"http://www.ecma-international.org/news/index1.html\">17th of June 2015</a> and is called by many names: <em>ECMAScript 6</em>, <em>ES6</em>, <em>ES2015</em>, and <em>ES6Harmony</em>.</p>\n<p>Based on current plans, new specs will be released on a yearly cycle. Please monitor <a href=\"http://www.ecma-international.org/news/index.html\">ECMA's news page</a>, especially changes related to the <a href=\"http://www.ecma-international.org/publications/standards/Ecma-262.htm\">ECMA-262</a> document, if you are really interested.</p>\n<p>Shall we as developers be excited? Definitely, cause we love bleeding-edge features, however we should also consider the <a href=\"http://kangax.github.io/compat-table/es6/\">browsers' compatibility list</a>.</p>\n<p>It turns out that main players as Google Chrome, Mozilla Firefox, Apple Safari, and Windows Edge adopt new JavaScript syntax slowly, each one in different pace and priority, so it's literally impossible to write modern Javascript syntax as it is. So what is the way then?</p>\n<p>As you know JavaScript is an interpreted language: the browser interprets the code as text, so there is no need to compile JavaScript. Since we want to use the latest features, we need a way to convert fancy source code into something that poor browsers can interpret. This process is called transpiling, and it is what <a href=\"https://babeljs.io/\">Babel</a> is designed to do.</p>\n<p>In this tutorial I will show you a few easy ways of tinkering with modern JavaScript syntax, without the need of installing anything nor going into complexity of Nodejs, NPM and Module bundlers.</p>\n<h2 id=\"assumptions\" style=\"position:relative;\"><a href=\"#assumptions\" aria-label=\"assumptions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Assumptions</h2>\n<ul>\n<li>you have your favorite browser and you know your way around Browser Developer Tools (like Firebug, Chrome Developer Tools)</li>\n<li>you have your favorite IDE or simple text editor</li>\n</ul>\n<h2 id=\"solution-i---babel-standalone\" style=\"position:relative;\"><a href=\"#solution-i---babel-standalone\" aria-label=\"solution i   babel standalone permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution I - Babel Standalone</h2>\n<p>Open your editor and create <strong>babel-standalone.html</strong> file, pasting in the following snippet</p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"language-html\"><code class=\"language-html\"><span class=\"token doctype\">&lt;!doctype html></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>html</span> <span class=\"token attr-name\">lang</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>en<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>head</span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>meta</span> <span class=\"token attr-name\">charset</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>utf-8<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>meta</span> <span class=\"token attr-name\">http-equiv</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>X-UA-Compatible<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">content</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>IE=edge<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>meta</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>viewport<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">content</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>width=device-width, initial-scale=1<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>title</span><span class=\"token punctuation\">></span></span>Babel Standalone Example<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>title</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>head</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>body</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>h1</span><span class=\"token punctuation\">></span></span>Babel Standalone Example<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>h1</span><span class=\"token punctuation\">></span></span>\n\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>https://unpkg.com/babel-standalone@latest/babel.min.js<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token script\"></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>script</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>text/babel<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token script\"><span class=\"token language-javascript\"> \n  <span class=\"token keyword\">const</span> <span class=\"token function-variable function\">getCompanyStreet</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">(</span><span class=\"token parameter\">street</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">`</span><span class=\"token string\">Your company's street is </span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${</span>street<span class=\"token interpolation-punctuation punctuation\">}</span></span><span class=\"token template-punctuation string\">`</span></span><span class=\"token punctuation\">;</span>\n  console<span class=\"token punctuation\">.</span><span class=\"token function\">log</span><span class=\"token punctuation\">(</span><span class=\"token function\">getCompanyStreet</span><span class=\"token punctuation\">(</span><span class=\"token string\">'Fideliolaan'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n  <span class=\"token keyword\">let</span> <span class=\"token punctuation\">{</span> x<span class=\"token punctuation\">,</span> y<span class=\"token punctuation\">,</span> <span class=\"token operator\">...</span>z <span class=\"token punctuation\">}</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span> x<span class=\"token operator\">:</span> <span class=\"token number\">1</span><span class=\"token punctuation\">,</span> y<span class=\"token operator\">:</span> <span class=\"token number\">2</span><span class=\"token punctuation\">,</span> a<span class=\"token operator\">:</span> <span class=\"token number\">3</span><span class=\"token punctuation\">,</span> b<span class=\"token operator\">:</span> <span class=\"token number\">4</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n  console<span class=\"token punctuation\">.</span><span class=\"token function\">log</span><span class=\"token punctuation\">(</span>z<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</span></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>script</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>body</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>html</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p>Several important things to note here</p>\n<ul>\n<li>We have used <em>unpkg</em>, the global CDN, to get the latest version of <em>babel-standalone</em> package. If you require other version, you may explore possible options here <a href=\"https://unpkg.com/babel-standalone/\">https://unpkg.com/babel-standalone/</a></li>\n<li>You don't need to use <em>unpkg</em>, feel free to choose other CDNs such as <a href=\"https://cdnjs.com/libraries/babel-standalone\">https://cdnjs.com/libraries/babel-standalone</a></li>\n<li>You don't even need to use the global CDN, instead you can grab <em>babel.min.js</em> file from <a href=\"https://github.com/babel/babel-standalone/releases\">Babel Standalone releases</a>, saving it locally inside your project</li>\n<li>As you see, modern JavaScript we wrote was placed inside script tag of type <code class=\"language-text\">text/babel</code>. You may also use an external JavaScript file with src attribute or even define data-presets or data-plugins as <code class=\"language-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>test.js<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>text/babel<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">data-presets</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>es2015,stage-2<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span></code></li>\n<li>Once you have included <em>babel.min.js</em> into your page, you automatically got global Babel object which you can use in Developers Console as <code class=\"language-javascript\">Babel<span class=\"token punctuation\">.</span><span class=\"token function\">transform</span><span class=\"token punctuation\">(</span><span class=\"token string\">'const getMessage = () => \"Hello World\"'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span> presets<span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">'es2015'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'es2016'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'stage-2'</span><span class=\"token punctuation\">]</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>code</code></li>\n<li>When you open your Developers Console, you will probably see this message: <em>You are using the in-browser Babel transformer. Be sure to precompile your scripts for production - <a href=\"https://babeljs.io/docs/setup/\">https://babeljs.io/docs/setup/</a></em> - don't worry about it for now.</li>\n</ul>\n<h2 id=\"solution-ii---babel-repl\" style=\"position:relative;\"><a href=\"#solution-ii---babel-repl\" aria-label=\"solution ii   babel repl permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution II - Babel REPL</h2>\n<p>Head over to <a href=\"http://babeljs.io/repl/#?babili=false&#x26;evaluate=true&#x26;lineWrap=false&#x26;presets=env%2Creact%2Cstage-2&#x26;targets=&#x26;browsers=&#x26;builtIns=false&#x26;debug=false&#x26;experimental=false&#x26;loose=false&#x26;spec=false&#x26;code_lz=MYewdgzgLgBA5gUygYRAWwA4EMwE8DKUATgkjALwwAU0JSAlBQHwwAGAmiAK5EyiY5cAcggxapWAEtRAEgDe4pAF9WAbgBQoSCAA2CAHQ6QcKohTpseQnShUhAMUkATBDsm6sOIfXob1e2DkYAA8AGhhccP1ogC8YJQoYIOCALhgARnDcNIAmcKw0gGZwgCM0gBZ4jS0IXQMjExjfIA&#x26;playground=true\">Babel REPL</a> and tinker with your modern JavaScript straight away.</p>\n<p>Everything you write on the left pane becomes dynamically transpiled in the right pane. You may choose from multiple presets and plugins. As you may have also noticed, there is no option to choose the version of Babel, since always the most stable release is used.</p>\n<h2 id=\"solution-iii---jsfiddle\" style=\"position:relative;\"><a href=\"#solution-iii---jsfiddle\" aria-label=\"solution iii   jsfiddle permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution III - JSFiddle</h2>\n<p>Head over to <a href=\"https://jsfiddle.net/tekmi/vb3t4kcs/\">JSFiddle</a>, an online JavaScript browser editor, and play around with your modern JavaScript syntax.</p>\n<p>Every time you create new fiddle, make sure you have chosen <em>Babel + JSX</em> as Language and added <a href=\"https://getfirebug.com/firebug-lite-debug.js\">Firebug Lite</a> as an External Resource.</p>\n<h2 id=\"solution-iv---codepen\" style=\"position:relative;\"><a href=\"#solution-iv---codepen\" aria-label=\"solution iv   codepen permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution IV - Codepen</h2>\n<p>Head over to <a href=\"https://codepen.io/tekmi/pen/qjwWpd?editors=1111\">Codepen</a> and enjoy another online JavaScript browser editor.</p>\n<p>Every time you create new pen, configure Babel as the JavaScript preprocessor. In order to do it, click on Settings button, choose JavaScript tab and pick up Babel from the drop-down list.</p>\n<h2 id=\"solution-v---jsbin\" style=\"position:relative;\"><a href=\"#solution-v---jsbin\" aria-label=\"solution v   jsbin permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution V - JSBin</h2>\n<p>Head over to <a href=\"https://jsbin.com/mapodub/edit?js,console,output\">JSBin</a>, yet another online JavaScript browser editor and find your way around it.</p>\n<p>Sadly there is only option to tinker with ES6 syntax. You cannot play with the bleeding-edge proposals like <a href=\"https://github.com/tc39/proposal-object-rest-spread\">Object Rest/Spread Properties</a> which is at the Stage 3 at the time of writing.</p>\n<p>If you are interested what are those Stages about, please read <a href=\"https://tc39.github.io/process-document/\">the ECMA T39 Process</a> document.</p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>The latest JavaScript features become more and more interesting. Also the ECMA's plans of adding them every year seems more mature and promising than ever before.</p>\n<p>Browsers will always lag behind the newest JavaScript syntax, so better get used to it and don't worry much. Thanks to tools like Babel, you can fully enjoy the modern JavaScript and leave the compatibility issues to the Babel engineers.</p>\n<p>If you are an adventurous soul, definitely take a look at another transpiler, such as <a href=\"https://buble.surge.sh/guide/\">Buble</a>.</p>\n<p>With all the solutions provided in this tutorial, it should be a breeze to start tinkering with the latest JavaScript syntax. If you are not experienced in ES6, head over to <a href=\"http://es6-features.org/\">ES6 Features</a> and get some inspiration.</p>\n<p>Additionally, I will prepare a series of tutorials about modern JavaScript syntax, so stay tuned - it will be full of examples available in Github, JSFiddle, Codepen, and JSBin.</p>\n<p>Lastly, expect another few blog posts about pre-compiling your scripts for production with Babel presets and Webpack.</p>"}},"pageContext":{"postId":"7d9789b2-dc6e-5015-9957-f7f495352d9a","slug":"how-to-start-using-modern-javascript-syntax-within-minutes"}}}