Speed up development with full-stack environments for every branch.

Learn More

Read file Sync [Node.js]

Forked from Hello World for Node.js.

3409 Runs 21899 Views 7357 Copies

Hello world in Node.js



mravinale 14

published 2 years ago

    var fs = require('fs');
    var contents = fs.readFileSync('test.txt').toString();
    console.log(contents); //esperamos por el resultado
    console.log("Hello!"); //ejecucion bloqueada
    Please login/signup to get access to the terminal.

    Your session has timed out.

    Dismiss (the page may not function properly).