Coder Social home page Coder Social logo

assignment_js_sprint's Introduction

assignment_js_sprint

Maddie Rajavasireddy

Assignment Description

Basic Problems The following functions are implemented and output displayed on index.html:

largestEl takes an array and returns the largest element.

reversed takes a string and reverses it.

loudSnakeCase takes a full sentence and puts it into "Loud_Snake_Case" format but strips out any non-character elements (like punctuation).

fizzBuzz takes an input of a number and returns an array containing all the elements from 1 to that number. Each element divisible by 3 is replaced by "FIZZ", each element divisible by 5 is replaced by "BUZZ" and each element divisible by both 3 and 5 is replaced by "FIZZBUZZ". Eg. fizzBuzz(6) => [ 1, 2, "FIZZ", 4, "BUZZ", "FIZZ" ]

compareArrays takes two arrays and checks to see if they are equal (same contents in the same order). Assume they're not nested.

myMap takes an array and a function. It passes every element from the array into that function, in turn, running the function. The returned array should be filled with each of the return statements from that function.

primes takes a number and outputs an array containing all prime numbers that occur prior to that number, e.g. primes(8) => [2,3,5,7]

All of the functions are contained within the object called sprintFunctions which is located in the scripts.js file.

Deployed at: https://maddiereddy.github.io/assignment_js_sprint/index.html

Roulette Game

The user should start with a bankroll and bet with each "spin" of the imaginary wheel. They can choose numbers 1-36. After each spin, the result is displayed and funds are distributed accordingly (payout is 35:1). The user has ability to bet on "0" (35:1), "00" (35:1), "Even" (1:1), "Odd" (1:1), "1 to 18" (1:1), "19 to 36" (1:1), "1st 12" (2:1), "2nd 12" (2:1), or "3rd 12" (2:1)

The game logic is in roulette.js and can be run in browser from roulette.hmtl and results viewed in console window

Deployed at: https://maddiereddy.github.io/assignment_js_sprint/roulette.html and viewed in console window (inspect)

assignment_js_sprint's People

Contributors

eriktrautman avatar maddiereddy avatar abbyjonesdev avatar

Watchers

James Cloos avatar  avatar

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.