Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

John Currie
1,768 Pointsonclick is deprecated?
'KeyboardEvent.keyIdentifier' is deprecated and will be removed in M53, around September 2016. See https://www.chromestatus.com/features/5316065118650368 for more details.
So I got the above error for the code that I was instructed to write for the "returning values" section of the object oriented javascript course, except for "onclick." I then took somebody's advice and used
button.addEventListener('click', function() = { var result = dice.roll(); printNumber(result); });
and I got the far above error message. Am I doing something wrong or are times just a' changin'? And if the convention is changing, how would I then perform this task?
Thanks guys, Jack
1 Answer

Steven Parker
242,770 PointsCould it be that your problem is only that stray equal-sign (=) between function()
and its code block?