Emperor01 / JSlearn

all my practical trainings
0 stars 0 forks source link

just good code #7

Open Emperor01 opened 6 years ago

Emperor01 commented 6 years ago

'use strict';

var question, animals = [];

function fillarr (arr) {

for (var i = 0; ; i++) {

arr[i] = prompt ('input value', '');
question = confirm ('continue to fill the array?');
if (question == false) break;

}

}

function showarr (arr) {

alert(arr);

}

fillarr(animals); showarr(animals);