Tag | javascript

  1. Read Lines from stdin in Node.js

    It is easy to write a hello world program in Node.js:

    console.log("Hello world!")
    

    However, due to the asynchronous nature of Javascript, reading inputs and writing outputs are less straight-forward. We have to pass the callback functions or register event listeners.

    First Attempt

    For example, to read some …

    More

  2. Browserify

    It is common to organize the code in several modules when we are developing Javascript applications. In Node.js ecosystem, we can import a module with the require() function and export symbols by adding them to the module.exports object. On the other hand, ES2015 adds import statements and export …

    More