erictgrubaugh
02/17/2017, 5:14 PM// myLibrary.js
function square(x) {
return (x * x);
}
function cube(x) {
return square(x) * x;
}
then in your script file:
function afterSubmit(type) {
var fiveSquared = square(5); // => 125
var threeCubed = cube(3); // => 27
// ...
}