Sha256: 871379ea54d7b20cbef5e0da7fbb71579b9de869e3e9b1f974e314adcc7333e7
Contents?: true
Size: 343 Bytes
Versions: 255
Compression:
Stored size: 343 Bytes
Contents
'use strict'; function Raindrops() {} Raindrops.prototype.convert = function (n) { var result = ''; if (n % 3 === 0) { result += 'Pling'; } if (n % 5 === 0) { result += 'Plang'; } if (n % 7 === 0) { result += 'Plong'; } if (result === '') { return n.toString(); } else { return result; } }; module.exports = Raindrops;
Version data entries
255 entries across 255 versions & 1 rubygems