ReferenceError: fs is not defined node js

JavaScript
// Define the `fs` at the beginning of the script
const fs = require('fs');var jsdom = require("jsdom");
var JSDOM = jsdom.JSDOM;
Source

Also in JavaScript: