Untitled
unknown
javascript
4 years ago
613 B
14
Indexable
function inputVerify (target) {
let input;
do {
input = prompt("Please Enter " + target +" :");
console.log(input)
} while (input !== null && input !== 'stop')
}
let get = inputVerify('Username');
const createObj = () => {
const obj = {}
let key, val;
do {
key = prompt("Key :");
if (key === 'stop') {break}
val = prompt("Value :")
if (val === 'stop') {break}
obj[key] = val
} while (key !== 'stop' && val !== stop)
return obj;
}
let test = createObj();Editor is loading...