Blockchain.js implemented using functions instead of classes. Its just a simple demo of the concept of adding the hashes of transactions into a chain.
Mining.js goes into more detail.In fact, this is what is really used. Before a block can be added into the chain, there must a challenge/difficulty where a crypto puzzle should be solved before it can be added to the chain.This is called proof-of-work.