Skip to content

Danroyal001/algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A collection of algorythms

  1. checkYuGiOh

This function (named "checkYuGiOh") takes a number, n, as an argument, creates an array of numbers from 1 to n and replaces multiples of 2, 3, and 5 with "yu", "gi" and "oh", then returns the resulting array.

Note:

  • for numbers that have multiple factors, use hyphens as separators e.g 10 === "yu-oh", 30 === "yu-gi-oh"
  • perform checks on your input and return invalid parameter: ${parameter} if an invalid parameter - i.e. a string that can't be converted to a number or another data type - is passed. @param {number} n Number of items in te array to be created @name checkYuGiOh @returns {(string|number)[]} An array of strings and numbers


About

algos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors