Last active
December 6, 2023 03:30
-
-
Save taroyanaka/1933b61ee6a6ae8031c68be27ebe4a75 to your computer and use it in GitHub Desktop.
Convert value to String
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 data100 = 200; | |
const obj = {data100: data100}; | |
const ary = []; | |
for (let i = 0; i < ary.length; i++) { | |
obj[ary[i]] = i; | |
} | |
for (let [key, val] of Object.entries(obj)) { | |
console.log(key); | |
console.log(val); | |
} | |
// => data100 | |
// => 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment