Skip to content

gcatkjspkgs/brainfuckJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KJS BrainFuck Interpreter

kjspkg-available

Docs

Execute bf code:

global.brainfuck("<code here>")

Get output:

let bf = global.brainfuck("+[.+]")
console.log(bf.output) // All ascii characters

Get other stuff:

let bf = global.brainfuck("+[.+]>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.")
console.log(bf.input) // Input code ("+[.+]>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.")
console.log(bf.lastCell) // The index of the last cell selected (1)
console.log(bf.cellArray) // The final array of cells ([0, 72, 0, 0, 0...])

Limitations

The , character is not supported.