I have to color a div based on the file extension. However, sometimes the file extension may not match with any of the file extensions that i have mentioned below so in that case I will color the div white. But with my condition below, it's always white even if the file extension matches with 'docx', 'doc', 'txt' what am I doing wrong here?
if(!this.fileExtension.toLowerCase().match('docx', 'doc', 'txt')) return ''