Using CoffeeScript output first 1000 prime numbers as strings, i.e 101 will output "one hundred and one". Also contains a JavaScript version of the code.
prime-coffee.html- contains a reference tocoffee/prime.js, which is the file compiled from CoffeeScript.coffeefolderprime.coffee- contains the CoffeeScript version of the code.prime.js- JavaScript file compiled fromprime.coffee.
prime.html- contains a reference tojs/prime.js, which is the JavaScript version of the code.jsfolderprime.js- contains the JavaScript version of the code.
testfolder- jasmine tests for
js/prime.js.
- jasmine tests for
Notes:
This is my first attempt at CoffeeScript, I have no previous experience with it.
This code only outputs prime numbers up to 4 digits long (the first 1229 prime numbers), as this is what was required in the current brief. Modifications will be needed to output a wider range on numbers.