Reputation: 505
I'm learning the MEAN stack and when I'm setting up my mongoDB with mongoose I use this:
mongoose.connect(mongooseUrl, function(err){
if(err){
console.log('There\'s been an error');
console.log(err);
} else {
console.log('Connected to '+ mongooseUrl + '!');
}
I just wanted to know if 'err' is a reserved keyword for error in JS.
Thank you!
Upvotes: 0
Views: 582
Reputation: 5376
No it is not... it is a completely arbitrary name that you assign yourself to a first function parameter in the arguments list
Upvotes: 3