SyntaxError no detectado: token inesperado = en Google Chrome
Tengo una función javascript que acepta un parámetro opcional. Esto funciona bien enFirefox
, pero enGoogle Chrome
muestra:-
Uncaught SyntaxError: Unexpected token =
Mi código,
function errorNotification(text = "Something went wrong!") {
$.pnotify({
title: 'Error',
text: text,
type: 'error'
});
}
He visto muchas preguntas similares pero no me doy cuenta de mi problema.