Commit 687488ee authored by Nurasyl's avatar Nurasyl

4 task

parent 5a1f669c
......@@ -42,23 +42,50 @@
const initialList = ['John', 'Jack', 'Harry', 'Mario', 'Link', 'Zelda', 'Bowser'];
const Host = {
guestList: [],
setGuestList: function(arr) {
for(let i = 0; i < arr.length; i++) {
const randomNum = Math.round(Math.random() * 100);
if(randomNum < 20) {
console.log(`${arr[i]} не очень.`);
} else {
this.guestList.push(arr[i]);
};
};
}
};
Host.setGuestList(initialList);
console.log(Host.guestList);
\ No newline at end of file
// const initialList = ['John', 'Jack', 'Harry', 'Mario', 'Link', 'Zelda', 'Bowser'];
// const Host = {
// guestList: [],
// setGuestList: function(arr) {
// for(let i = 0; i < arr.length; i++) {
// const randomNum = Math.round(Math.random() * 100);
// if(randomNum < 20) {
// console.log(`${arr[i]} не очень.`);
// } else {
// this.guestList.push(arr[i]);
// };
// };
// },
// showList: function() {
// return this.guestList;
// }
// };
// Host.setGuestList(initialList);
// let a = Host.showList();
// while(true) {
// const age = prompt("Возраст клиента");
// const clients = [];
// if(age === null) break;
// if(parseInt(age) < 18) {
// alert("гуляй");
// continue;
// };
// console.log("Продали");
// clients.push(age);
// };
const listLetters = [];
const currentLetter = "asd";
const mystic = "__";
const correct = "_s_"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment