A simple Brainfuck implementation in JavaScript.
Using e.g. Node.js as interpreter you can run it with:
> node brainfuck.js "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."
Hello World!
In theory the memory used for Brainfuck programs are and infinite band of memory. This implementation has a fixed length of MEMORY_SIZE
cells and has borders. Before the input code is interpreted a pre-caluclation step will look for matching brackets and store it inside a lookup table to speed up the runtime. At this point of time the code does not do any kind of error checks. Invalid code like ]
will lead to undefined behaviour.