Reputation: 14950
I have created this module:
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return
{
isEmpty : isEmpty,
inArray : inArray //Error here
};
});
But I'm having an error: Module Loader Error on line inArray : inArray. Is my module correct?
Upvotes: 1
Views: 44
Reputation: 190907
You are getting automatic semicolon insertions. You are effectively returning undefined.
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return { // correct here
isEmpty : isEmpty,
inArray : inArray //Error here
};
});
Upvotes: 2