missating / BT-RainDrops

A program that converts a number to a string, depending on the number's prime factors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BT-RainDrops

This program converts a number to a string, the contents of which depends on the number’s prime factors.

If the number contains 3 as a prime factor, output "Pling". If the number contains 5 as a prime factor, output "Plang". If the number contains 7 as a prime factor, output "Plong". If the number does not contain 3, 5, or 7 as a prime factor, just pass the number’s digits straight through.

The program uses TDD method using Mocha and Chai

How to run the program locally:

  1. Run npm install to install all needed dependencies
  2. Run npm test to start Mocha which immediately runs babel to transpil and also test

About

A program that converts a number to a string, depending on the number's prime factors.


Languages

Language:JavaScript 100.0%