So basically we could use it like this:
function aFunc(aParam) {
throw new Error(nameof(aParam));
}
and nameof(aParam) would return the string "aParam".
This is possible to do even right now using arguments.callee and some hacky
code, but having it built-in to spec would be nicer IMHO.
--
Best regards,
Behrang Saeedzadeh
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

