My main.js file contains this code:
require(["module"],function(f){
f();
});
and my module.js file contains
define(function(){
var hasReturn = function(){
console.log("This returns");
}
return hasReturn;
});
But when I try to run this script my browser throws a type error,tells me f is not function.I ve searched for this but couldnt find anything helpful,sorry if posted before.