Implementation of Brainfuck in Javascript

Written by Tomi Panula-Ontto, date: 2012-12-23

http://en.wikipedia.org/wiki/Brainfuck

Brainfuck source Js Output

you might also like an optimizing brainfuck to js compiler which I wrote few hours later (after having a good night sleep)

Note! Brainfuck applications (merry xmas & hello world) found from the internet. Thank you guys, whoever you are.

Implemented syntax:
CharacterMeaning
>Increment the pointer (to point to the next cell to the right).
<Decrement the pointer (to point to the next cell to the left).
+Increment (increase by one) the byte at the pointer.
-Decrement (decrease by one) the byte at the pointer.
.Output the value of the byte at the pointer.
,Accept one byte of input, storing its value in the byte at the pointer.
[Jump forward to the command after the corresponding ] if the byte at the pointer is zero.
]Jump back to the command after the corresponding [ if the byte at the pointer is nonzero.