I hereby claim:
- I am nostromos on github.
- I am mikemonaghan (https://keybase.io/mikemonaghan) on keybase.
- I have a public key ASBnFGVq5uui1TOps56N8sXC-yLSU0YEucMs0p1Y6KGEaQo
To claim this, I am signing this object:
let ourPlanet = 'moon'; | |
// For the below, when JS is 'reading' (aka parsing) this line, it reads it like this: | |
// if ourPlanet equals 'Moon' OR if there's a string 'moon' that exists. | |
// What you really want to tell it is- if our planet equals "Moon" OR if our planet equals "moon" THEN... do something. | |
if (ourPlanet === "Moon" || "moon") console.log('No, that\'s not a planet! Try again!'); // You need to wrap the 'then' statement in curly brackets. if (something) ->{do something}<- else if (something) {do something}. | |
else if (ourPlanet === "Sun" && /* ourPlanet === */ "sun") console.log('No, that\'s not a planet, but it\'s also called a star! Try again!'); | |
else if (ourPlanet === "Venus" && "venus") console.log('Nope,you\'re wrong! Try again!'); | |
else if (ourPlanet === "Mars" && "mars") console.log('No, that\'s not the correct answer! Guess again!'); | |
else if (ourPlanet === "Pluto" && "pluto") console.log('Incorrect answer! It\'s a Dwarf Planet Guess again!'); |
/* | |
I included a lot of extraneous functions in an effort to modularize things and make it easier to handle | |
future improvements. For example, every win/loss condition has its own function, which makes it easier to | |
change & edit them. | |
*/ | |
const prompt = require("prompt-sync")({ sigint: true }); |
const express = require('express'); | |
const apiRouter = express.Router(); | |
const minionsRouter = require('./minionsRouter'); | |
apiRouter.use('/minions', minionsRouter); | |
const ideasRouter = require('./ideasRouter'); | |
apiRouter.use('/ideas', ideasRouter); | |
const meetingsRouter = require('./meetingsRouter'); |
I hereby claim:
To claim this, I am signing this object: