node load file
const fs = require("fs");
// __dirname means relative to script. Use "./data.txt" if you want it relative to execution path.
fs.readFile(__dirname + "/data.txt", (error, data) => {
if(error) {
throw error;
}
console.log(data.toString());
});
Also in JavaScript:
- angular how to copy text with button
- jquery give control focus
- react native side drawer
- video recorder using webrtc and javascript
- on success replace class div ajax
- ignore node_modules
- target all element besides the clicked one
- js key in dict
- jquery use variable in string "without" concatenate
- heroku router Cannot GET
- command reboot android app react native adb command
- react native button
- how to load localt ext file in js
- angular bind to class or ngClass
- how to remove first element of array in javascript
- jquery make readonly textbox
- javascript moment get current date
- javascript base64 decode
- implicit return arrow function
- how to do basic authentication with fetch api
- javascript float to int
- json server
- str_word_count php js
- jquery select input value empty and hasclass