4 ms·
'yield' was a reserved word in the ES4 spec, and a 'FutureReservedWord' in ES5 so if there is code that uses it as an identifier, it has been technically broken
by untothebreach 12y ago
'yield' was a reserved word in the ES4 spec, and a 'FutureReservedWord' in ES5 so if there is code that uses it as an identifier, it has been technically broken since 2008...
- gsnedders 12y agoWhat ES4 says is irrelevant. yield is only a FutureReservedWord in ES5 when within strict mode code; in non-strict code it is not a keyword, and plenty of code uses it and works in ES5 implementations.