.min is the minified version, and it is primarily used while the website is being launched in order to reduce the load for the particular website.
Basically all the long variable names and function names are converted into shorter ones during the process of minifying. As consequence it would reduce the size of that particular file, so it would less the loading speed of the website.
On the other hand normal .js is the one which is used until the site being launched, meaning while the site in the mode of development/testing.
Videos
Why do people use .min.js to use a script like jQuery? Is it faster for the computer to read the code like that?
How about augmenting the built-in Array object to use Math.max/Math.min instead:
Array.prototype.max = function() {
return Math.max.apply(null, this);
};
Array.prototype.min = function() {
return Math.min.apply(null, this);
};
let p = [35,2,65,7,8,9,12,121,33,99];
console.log(`Max value is: ${p.max()}` +
`\nMin value is: ${p.min()}`);
Here is a JSFiddle.
Augmenting the built-ins can cause collisions with other libraries (some see), so you may be more comfortable with just apply'ing Math.xxx() to your array directly:
var min = Math.min.apply(null, arr),
max = Math.max.apply(null, arr);
Alternately, assuming your browser supports ECMAScript 6, you can use spread syntax which functions similarly to the apply method:
var min = Math.min( ...arr ),
max = Math.max( ...arr );
var max_of_array = Math.max.apply(Math, array);
For a full discussion see: http://aaroncrane.co.uk/2008/11/javascript_max_api/