Skip to content

Instantly share code, notes, and snippets.

@spenserhuang
Last active December 28, 2017 06:36
Show Gist options
  • Save spenserhuang/d74b41de005a6d7ed5fdfd96083c0d98 to your computer and use it in GitHub Desktop.
Save spenserhuang/d74b41de005a6d7ed5fdfd96083c0d98 to your computer and use it in GitHub Desktop.
Starting Code
let jsChain = new Blockchain();
jsChain.addBlock(new Block("12/25/2017", {amount: 5}));
jsChain.addBlock(new Block("12/26/2017", {amount: 10}));
console.log(JSON.stringify(jsChain, null, 4));
console.log("Is blockchain valid? " + jsChain.checkValid());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment