I'm new to block chain technology. I'm trying to store and read blocks using testRPC along web3.js. I'm able to get the latest block data but not able to fetch previous blocks data. Please some one tell me how can I get it.
You can use:
web3.eth.getBlock(blockHashOrBlockNumber [, returnTransactionObjects] [, callback])
checkout web3 documentation: https://web3js.readthedocs.io/en/1.0/web3-eth.html#getblock