Last active
December 18, 2019 15:07
-
-
Save ssaurel/8ae35378f2523a2cc1fcef54f70317e2 to your computer and use it in GitHub Desktop.
Blockchain in JS in action by @ssaurel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blockchain = new Blockchain(4); | |
var block1 = blockchain.newBlock("Second Block"); | |
blockchain.addBlock(block1); | |
var block2 = blockchain.newBlock("Third Block"); | |
blockchain.addBlock(block2); | |
var block3 = blockchain.newBlock("Fourth Block"); | |
blockchain.addBlock(block3); | |
console.log("Blockchain Validity: " + blockchain.isBlockchainValid()); | |
blockchain.display(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment