Fixed formatting problems

This commit is contained in:
Alexandrshy
2019-07-23 08:37:29 +04:00
parent bac32b613b
commit 84b6d19416
3 changed files with 156 additions and 159 deletions

View File

@@ -1,16 +1,20 @@
'use strict';
"use strict";
const voted = {};
/**
* Vote check
* @param {string} name Voter name
*/
function check_voter(name) {
if (voted[name]) {
console.log('kick them out!');
console.log("kick them out!");
} else {
voted[name] = true;
console.log('let them vote!');
console.log("let them vote!");
}
}
check_voter("tom"); // let them vote!
check_voter("mike"); // let them vote!
check_voter("mike"); // kick them out!