This one's a long shot...
In Javascript, I was accessing an object attribute that I was certain existed, but I had a typo was in the name of the key, so was returning undefined
and creating a bug.
How can I write code equivalent to the following, but that throws an error because the key does not exist?
var obj = {'myKey': 'myVal'},
val = obj.myKye;
I'm trying to find a solution that doesn't require me writing a wrapper function that I use every time I want to access a member of an object. Is it possible? Is there another, 'stricter' technique in Javascript for accessing object attributes?