Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 939 Bytes

README.md

File metadata and controls

16 lines (10 loc) · 939 Bytes

Yes

Some concise implementations of yes I wrote for fun with the goal of using as few characters as possible.

yes.scala

Run using scala yes.scala to output "y" until killed or scala yes.scala mystring to output "mystring" until killed. To kill the process, hit Ctrl-C.

yes.js

The easiest way to test this is to paste the contents of yes.js into your web browser console. Doing this defines a function, y. Then you can type y() to output "y" repeatedly or y("mystring") to output "mystring" repeatedly.

FizzBuzz

A classic programming interview question. Print the numbers from 1-100. But, for numbers divisible by 3, print "Fizz" instead of the number. For numbers divisible by 5, print "Buzz" instead of the number. For numbers divisible by both 3 and 5, print "FizzBuzz".

fizzBuzz.js

Just run the program in a browser console or node. There are no functions to call.