I have a javascript function which accept an optional parameter. This works fine in Firefox, but in Google Chrome it shows:-
Firefox
Google Chrome
Uncaug
Javascript does not allow you to pass default arguments like that. You need to assign the default internally to the function.
function errorNotification(text) { text || (text = "Something went wrong!"); $.pnotify({ title: 'Error', text: text, type: 'error' }); }