.DS_Store
# Learn ES6 (ECMAScript 2015)

![](https://d2eip9sf3oo6c2.cloudfront.net/series/square_covers/000/000/049/full/EGH_LearnES6_Final.png?1496436434)

This course takes a look at some of the new features that JavaScript has available with ES6 (ECMAScript 2015). It is a "montage" from several instructors.

Each lesson's code is in its corresponding lesson folder. Plunks are drawn from the lesson's branch.
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Plunker</title>
</head>
<body>
	<script src="script.js"></script>
</body>
</html>
var salutation = "Hello";
var place = "planet";
var greeting = `

${salutation},
  You
    Crazy        ${place}

    How
  Are
      You


`;

console.log(greeting) || displayInPreview(greeting);

var x = 1;
var y = 2;
var equation = `${ x } + ${ y } = ${ x + y }`

console.log(equation) || displayInPreview(equation);

function tag(strings, ...values){
    if(values[0] < 20) {
        values[1] = "awake";
    }

    return `${strings[0]}${values[0]}${strings[1]}${values[1]}`
}


var message = tag`It's ${new Date().getHours()} I'm ${""}`;

console.log(message) || displayInPreview(message);



// display in plunker preview
function displayInPreview(string) {
  var newDiv = document.createElement("div"); 
  var newContent = document.createTextNode(string); 
  newDiv.appendChild(newContent);
  document.body.appendChild(newDiv)
}