Created
April 24, 2016 15:13
-
-
Save gurucharanmk/12dd7d39705d63d6520154b4c4f68829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("======================[Array]======================"); | |
for (let x of ['a', 'b', 'c']) { | |
console.log(x); | |
} | |
//String | |
console.log("======================[String]======================"); | |
for (let x of 'Hello World!') { | |
console.log(x); | |
} | |
//TypedArray | |
console.log("======================[Typed Array]======================"); | |
var int16 = new Int16Array(2); | |
int16 = [1, 100]; | |
for (let x of int16) { | |
console.log(x); | |
} | |
//Map | |
console.log("======================[Map]======================"); | |
let map = new Map().set('Bob', 'bob@example.com').set('Doe', 'doe@example.com'); | |
for (let pair of map) { | |
console.log(pair); | |
} | |
//Sets | |
console.log("======================[Set]======================"); | |
let bool = new Set().add('0').add('1'); | |
for (let x of bool) { | |
console.log(x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment