3 ms·
They aren't needed at all. Semicolons in JS are optional. Which becomes really annoying if you just want to quickly concatenate a few files together. Sure, it
by mootothemax 11y ago
They aren't needed at all. Semicolons in JS are optional.
Which becomes really annoying if you just want to quickly concatenate a few files together.
Sure, it's something that you can fix yourself; I'd consider it a common courtesy to include at least one, though.
- bakabaka9 11y agoIn the worst case, you can do something along the lines of [file1, file2, file3].join(';\n') albeit if you're using any kind of post-processing tool, like UglifyJS or Google's Closure compiler, then everything just works, as these tools actually parse JavaScript. There's usually no need to explicitly concatenate the code prior to minification or other processing.