Untaught SyntaxError: Token inesperado = no Google Chrome
Eu tenho uma função javascript que aceita um parâmetro opcional. Isso funciona bem emFirefox
, mas emGoogle Chrome
isto mostra:-
Uncaught SyntaxError: Unexpected token =
Meu Código
function errorNotification(text = "Something went wrong!") {
$.pnotify({
title: 'Error',
text: text,
type: 'error'
});
}
Eu vi muitas perguntas semelhantes, mas não consigo perceber o meu problema.