Currently I am creating a filemanager.
What I want is to check if the user has selected a video file. The file can be mov, f4v, flv<
mov
f4v
flv<
You would need to explicitly compare the variable against each of those values.
if( ext === 'mov' || ext === 'f4v' || ... ) { }
..but, RegExp to the rescue, we can go like
if( /mov|f4v|flv|mp4|swf/.test( ext ) ) { }