Use Array.forEach instead of for-in to avoid iterate over internal properties of keystorkeElements. It will cause a crash because keystrokeIndex will be 'distinct' instead of real index, and it will make keyboardShortcutElement to be a function. firstKeystrokeAttr & secondKeystrokeAttr will be undefined.
Use
Array.forEach
instead of for-in to avoid iterate over internal properties ofkeystorkeElements
. It will cause a crash becausekeystrokeIndex
will be'distinct'
instead of real index, and it will makekeyboardShortcutElement
to be a function.firstKeystrokeAttr
&secondKeystrokeAttr
will be undefined.