ES6 Syntax Examples IV : for ... of Loops, Template Literals & Destructing

Simple for ... of Usage
'use strict';  
var fruits = ['apple','orange','strawberry'];  
for(var fruit of fruits){  
    console.log(fruit + '-');
}

Logs: apple-orange-strawberry-


Basic Template Literal
'use strict';  
let bookId = '27362';  
console.log('Book Id : ${bookId}');

Logs: Book Id : 27362


Variable in Template Literal
'use strict';  
let bookId = '27362';  
console.log('Book Id : ${'ID-'+bookId}');  

Logs: Book Id : ID-27362


Basic Destructuring
'use strict';  
let salary = [2000,3000,4000];  
let [low,medium,high] = salary;  
console.log(medium);  

Logs: 3000