Skip to content

Instantly share code, notes, and snippets.

View winnekes's full-sized avatar
🤖
beep boop

Simona Winnekes winnekes

🤖
beep boop
View GitHub Profile
if (user1.choice !== 'no choice' && user2.choice !== 'no choice') {
if (user1.choice === user2.choice) {
updatedRoom = await room.update({
status: 'game is over',
winner: `oh, it's a tie!`,
});
} else {
if (user1.choice === ROCK) {
if (user2.choice === SCISSORS) {
updatedRoom = await room.update({
@winnekes
winnekes / localStorage.js
Created October 22, 2019 20:21
localStorage Example
let myDetails = {
name: 'Simona',
hobbies: ['reading', 'sleeping'],
cats: ['Fetti', 'Diego'],
loves: 'Robots'
};
// add key/value pairs to your localStorage
// to store JS objects you need to serialise them first
localStorage.setItem('details', JSON.stringify(myDetails));
@winnekes
winnekes / test
Created October 22, 2019 07:18
Test
test