Code Monkey home page Code Monkey logo

lab-101-js-conditionals's People

Contributors

vincentmaule avatar

Watchers

Erik Gillespie avatar  avatar

lab-101-js-conditionals's Issues

Project Feedback

Write a short choose-your-own adventure game in JavaScript

@egillespie Can you take a look at this? It's hosted here and meets the following criteria:

  • Use the prompt and confirm functions (each at least once) to collect choices from the user (the entire story will take place in dialog boxes, so your body element could actually be empty, apart from the script element to include your JavaScript)
  • Use if, else if, and else to branch the story, based on user choices
  • In at least one branch, there should be at least 3 choices for the user to make
  • Include at least one branch where different things can happen each time with Math.random()
  • Use a logical operator (&& or ||) at least once, where it makes sense
  • Use a truthy or falsy condition in at least one if statement
  • It should be impossible for an error to ever occur when playing your game, including handling for null/undefined where appropriate
  • All string input should be normalized, so that extra whitespace or a letter that's the wrong case will never cause a failed match
  • At least one number value is collected and used in a comparison (don't forget to convert it into a number first)
  • Don't get too carried away -- it can be tempting to build a complex video game, but remember, you can always come back and build on this project later

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.