Reputation: 3953
I'm new to jQuery and im just trying to pass a boolean to a function.Ive tried various amendments but still not working ?
I'm expecting the alert to be fired
isTrue(true);
function isTrue(boolean isNot){
if(isNot){
alert('true');
}
}
Upvotes: 23
Views: 70736
Reputation: 119897
JavaScript (not Java) has no type indicators, just variable names. Remove boolean
function isTrue(isNot){
if(isNot){
alert('true');
}
}
Upvotes: 42