Created
August 3, 2018 15:55
-
-
Save adatta02/c72202492a8cca6ec8d7e4f42a77529b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const arrayOfStrings: string[] = []; | |
arrayOfStrings.push('hello'); | |
arrayOfStrings.push('world'); | |
arrayOfStrings.push('how are'); | |
arrayOfStrings.push('you'); | |
let charCounter = 0; | |
for (let i = 0; i < arrayOfStrings.length; i ++) { | |
for (let k = 0; k < arrayOfStrings[i].length; k++) { | |
charCounter++; | |
} | |
} | |
console.log(charCounter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment