315a2
v1.0.0
Published
315 assignment 2
Downloads
3
Readme
Assignment 2
Creating functions in javascript
Purpose
**BEWARE: This library was published for learning purposes. It is not in Describe the intended intent
Usage
Install it:
npm install @ormle/315a2
Require it:
const _ = require('ormle/315a2');
Call it:
Documentation
The following functions are currently implemented:
findNaNIndex(array)
: Finds all the indexes where NaN is found inany given array of numbers and NaNisArrayFactorChain(array)
: Returns true of false if an array is a factor chain or notcountNumberOfArrays(array)
: Returns the count for the number of arrays inside a given arrayparticipants(matches)
: Returns an array of all the player names. No player is listed more than oncewinnersObject(matches)
: Returns an object which lists each participant, and a list of who they've beatenbiggestLoser(matches)
: Returns the loser name with the biggest tally of loser_points. If a player is the winner, the loser_points are substracted, and if a player is a loser, then the loser_points are added.