Okay, so I'm using require_once to load the contents of a .js file. However, there seems to be a 1
added to the end of the file after the require is done.
PHP:
echo require_once("test.js");
JS:
var newFunc = function() {
console.log('yay!');
};
rendered html when the PHP file is loaded:
var newFunc = function() {
console.log('yay!');
};1