Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Learning JavaScript
- // chapter 14 : Asynchronous Programming
- // Callback Hell!!
- const fs = require('fs');
- function readSketchyFile() {
- try {
- fs.readFile('does_not_exist.txt', function(err, data) {
- if (err) throw err;
- });
- } catch (err) {
- console.log('warning : minor issue occurred, program continuing ');
- }
- }
- readSketchyFile();
Add Comment
Please, Sign In to add comment