There's also an error where I try to run multiple functions onclick.
<img onclick="showMore(); displayArtwork()" id = "charcoalimg" src = "images/charcoal.png" alt="image">
Javascript:
function displayArtwork(){
var totalimg;
// get total number of images in painting's directory
var fs = require('fs');
fs.readdir( 'Code/girl', function(error, files) {
var totalimg = files.length; // return the number of files
console.log(totalimg); // print the total number of files
});