What are common pitfalls with minification?

Minification is a process used to reduce the file size of JavaScript (and other code) by removing unnecessary characters, such as whitespace, comments, and new lines. However, there are common pitfalls to beware of during the process.
common pitfalls, minification, JavaScript minification, code optimization
// Example of a common pitfall with minification: var exampleFunction = function() { // This is a comment that will be removed console.log('Hello, World!'); // alert('This will not work if commented out'); }; exampleFunction();

common pitfalls minification JavaScript minification code optimization