(1..100).map do |i|
lambda { |str| str.empty?? i : str }.call(
[3, 5].reduce("") { |mem, obj|
(i%obj).zero?? mem + {3=>"Fizz",5=>"Buzz"}[obj] : mem
})
end
Starting with javascript or any C-syntax language give you headstart against the hipster script kiddies. Plus if you want to use anything else there is tons of *-to-Javascript compilers like MetaJS and Coffeescript. Or you can wait a few years and JS will be upgraded with abstract bullshit from current hipster languages and more speed hacks. JS is basically is the Lisp that was practical to use(freedom of expression with normal syntax), but in fact its far more powerful and free.
You can define the whole "class inheritance" model in few lines of JavaScript. http://www.crockford.com/javascript/inheritance.html#sugar
People who want to add classes to JavaScript, just simply don't get it(Classes are inferior to Function/Object/Prototype chain of JS).
Name:
Anonymous2013-09-09 13:41
How about some J? ([:<]`('Fizz'"_)`('Buzz'"_)`('FizzBuzz'"_)@.([:#.0:=5 3&|))"0
for(unsigned long long long long long long i = 0; i = 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;i++){printf("FAZZ BAZZ");;i=0;}
Name:
Anonymous2013-09-09 14:32
IDENTIFICATION DIVISION.
PROGRAM-ID. FIZZBUZZ.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 FIZZ-CNT PIC S9(4) BINARY.
01 BUZZ-CNT PIC S9(4) BINARY.
01 I PIC S9(4) BINARY.
PROCEDURE DIVISION.
MOVE ZERO TO FIZZ-CNT
MOVE ZERO TO BUZZ-CNT
PERFORM VARYING I FROM 1 BY 1
UNTIL I > 100
COMPUTE FIZZ-CNT = FIZZ-CNT + 1
COMPUTE BUZZ-CNT = BUZZ-CNT + 1
EVALUATE TRUE
WHEN FIZZ-CNT = 3 AND BUZZ-CNT = 5
DISPLAY 'FIZZBUZZ'
MOVE ZERO TO FIZZ-CNT
MOVE ZERO TO BUZZ-CNT
WHEN FIZZ-CNT = 3
DISPLAY 'FIZZ'
MOVE ZERO TO FIZZ-CNT
WHEN BUZZ-CNT = 5
DISPLAY 'BUZZ'
MOVE ZERO TO BUZZ-CNT
WHEN OTHER
DISPLAY I
END-EVALUATE
END-PERFORM
GOBACK
.
Name:
Anonymous2013-09-09 14:41
static void BeginJourney(string[] adventurers)
{
var currentLevel = 0;
while (currentLevel < 100) {
var fizzy = Loremaster.CanDividethBy(currentLevel, 3);
var buzzable = Loremaster.CanDividethBy(currentLevel, 5);
if (fizzy && buzzable) {
Warrior.Battlecry("FIZZBUZZ you villains!");
}
else if (fizzy ) {
Bard.Sing( "Verily the number is fizzy, liketh mine ale.");
}
else if (buzzable) {
Cleric.Chant("O Yelm! O Orlanth! Heed my faithful buzz!");
}
else {
Dungeonmaster.Whisper("Your level is " + currentLevel.ToString());
}
currentLevel = LevelUp(currentLevel);
}