I have a javascript function which accept an optional parameter. This works fine in Firefox
, but in Google Chrome
it shows:-
Uncaught SyntaxError: Unexpected token =
My Code,
function errorNotification(text = "Something went wrong!") {
$.pnotify({
title: 'Error',
text: text,
type: 'error'
});
}
I have seen lot of similar questions but I can't realize my problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…