Created
June 15, 2020 16:35
-
-
Save KonstKh/dfee2121ed2e9c4e325e03984d8cc4ac to your computer and use it in GitHub Desktop.
JS Bin [create list of Month's automatically] // source https://jsbin.com/wedubal
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[create list of Month's automatically]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
create list of Month's automatically | |
<script id="jsbin-javascript"> | |
let start = 0; | |
const minLength = 12; | |
const maxLength = 180; | |
const values = Array.from(Array(maxLength/minLength), () => start += 12); | |
const financeTerms = []; | |
values.forEach(val => { | |
// financeTerms[val] = `${val} Monate` | |
financeTerms.push({[val]: `${val} Monate`}) | |
}) | |
financeTerms.map(term => | |
console.log(Object.entries(term)[0][1]) | |
) | |
// for (let [key, value] of Object.entries(financeTerms)) { | |
// console.log(`${key}: ${value}`); | |
// } | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">let start = 0; | |
const minLength = 12; | |
const maxLength = 180; | |
const values = Array.from(Array(maxLength/minLength), () => start += 12); | |
const financeTerms = []; | |
values.forEach(val => { | |
// financeTerms[val] = `${val} Monate` | |
financeTerms.push({[val]: `${val} Monate`}) | |
}) | |
financeTerms.map(term => | |
console.log(Object.entries(term)[0][1]) | |
) | |
// for (let [key, value] of Object.entries(financeTerms)) { | |
// console.log(`${key}: ${value}`); | |
// } | |
</script></body> | |
</html> |
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
let start = 0; | |
const minLength = 12; | |
const maxLength = 180; | |
const values = Array.from(Array(maxLength/minLength), () => start += 12); | |
const financeTerms = []; | |
values.forEach(val => { | |
// financeTerms[val] = `${val} Monate` | |
financeTerms.push({[val]: `${val} Monate`}) | |
}) | |
financeTerms.map(term => | |
console.log(Object.entries(term)[0][1]) | |
) | |
// for (let [key, value] of Object.entries(financeTerms)) { | |
// console.log(`${key}: ${value}`); | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment