Am trying to call a JS script from a function library in another script.
Eg. iceCreams.Js contains —>
iceCream(iceCreams){
var profit = .54
var Total = iceCreams * profits
return Total;
}
register.js contains –>
dailyTotals(wages, iceCreams){
var total = iceCream(iceCreams);
var profit = iceCreaps - wages
return wages;
}
Any help pointing me in the right direction?!
Running the javascripts is done in client side and after rendering the full html. So, you have to add script tag for the library javascripts before consuming ones.
Just add script tag for the library before the one for register: