Last active
May 5, 2023 01:28
-
-
Save kironroy/011f183bdc1d4c9ef7cbbbb400049641 to your computer and use it in GitHub Desktop.
for loop js
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
const ginaArr = [ | |
'Gina', | |
'Davis', | |
2037 - 1967, | |
'singer', | |
['Sam', 'Tam', 'Mam'], | |
true | |
]; | |
const types = []; | |
// reading from array | |
for (let i = 0; i < ginaArr.length; i++) { | |
console.log(ginaArr[i], typeof ginaArr[i]); | |
// filling types of array | |
// types[i] = typeof ginaArr[i]; | |
types.push(typeof ginaArr[i]); | |
} | |
console.log(types); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment