doc: Adding 'use strict' to ES6 examples
Checklist
- [x ] documentation is changed or added
- [x ] the commit message follows commit guidelines
Affected core subsystem(s)
doc: Adding 'use strict' to ES6 examples
Description of change
The events documentation provides examples for both traditional and ES6 syntax, however strict mode needs to be enabled in order for the ES6 examples to work without modification. I added 'use strict' to the full examples (not snippets) and changed the preceding text in the first example.