Skip to content

Tag: node.js

Javascript function and expression function

This tiny Javascript program returns the sha256 hash of its text. Executed with Nodejs Erbium, it works as expected. However, after writing it I thought that the function expression was not needed and so I changed the data line with the following: stream.on(‘data’, shasum.update); And it crashes w…