clean up javascript files

This commit is contained in:
Aditya Bhargava
2017-06-11 16:15:26 -07:00
parent 6f78bdf3d7
commit 468fda77a2
10 changed files with 0 additions and 86 deletions

View File

@@ -1,10 +0,0 @@
'use strict';
const book = {};
// an apple costs 67 cents
book['apple'] = 0.67;
// milk costs $1.49
book['milk'] = 1.49;
book['avocado'] = 1.49;
console.log(book); // { apple: 0.67, milk: 1.49, avocado: 1.49 }

View File

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