Skip to content

Instantly share code, notes, and snippets.

View Kharouk's full-sized avatar
🛹
Pop-shoving knowledge.

Alex Kharouk

🛹
Pop-shoving knowledge.
View GitHub Profile
const menu = {
_courses: {
appetizers: [],
mains: [],
desserts: []
},
get courses() {
return {
appetizers: this._courses.appetizers,
mains: this._courses.mains,
@Kharouk
Kharouk / blackJack.js
Last active June 26, 2018 11:48
freeCodeCamp - BlackJack demonstration - Can this be more DRY?
var count = 0;
function cc(card) {
// Only change code below this line
if (card == 1 || card == 2 || card == 3 || card == 4 || card == 5 || card == 6) {
count++;
} else if (card == 7 || card == 8 || card == 9) {
count = count;
} else if (card == 10 || card == 'J'|| card == 'Q' || card == 'K' || card == 'A') {
count--;
@Kharouk
Kharouk / rockPaperScissors.js
Last active June 18, 2018 09:41
My Rock Paper Scissors Variation
function getComputerChoice() {
randomNumber = Math.floor(Math.random() * 3);
switch (randomNumber) {
case 0:
return 'rock';
case 1:
return 'paper';
case 2:
return 'scissors';
break;