I am trying to figure out the proper syntax of how to write an if statement that checks if x == (at least one of many vars)
I have an example what what I am trying to get to...
var path = require('path')
var fs = require('fs')
var file1 = './frank.txt'
var file2 = './jasmine.html'
var file3 = './finnigan.jpg'
if (fs.statSync(file2).isFile && path.extname(file2) == ['.txt' || '.html']) {
console.log('true')
} else {
console.log('failure')
}
I know the syntax on the after is && is weird, but what is the correct syntax for the situation?