Ecmascript 2015 (ES6) - Part 2

Template

favorite = 'ruby'
var template = `I like ${favorite}`;
console.log(temp)     // I like ruby

var blogs = [
  {
    title : "ES6 part 1",
    author: "rubysnippets.net"
  },
  {
    title : "ES6 part 2",
    author: "rubysnippets.net"
  }
];

blogs.map(function(blog, key){
  var tmpl = `
    <div>
      <h1>${blog.title}</h1>  
      <h2>${blog.author}</h2>
    </div>
  `;
  console.log(tmpl);
});
/*
    <div>
      <h1>ES6 part 1</h1>  
      <h2>rubysnippets.net</h2>
    </div>
    <div>
      <h1>ES6 part 2</h1>  
      <h2>rubysnippets.net</h2>
    </div>
*/

Check object's different

let difference = Object.keys(obj1).filter(k => obj1[k] !== obj2[k]);