Well done!

You have completed Comprehensive Overview of JavaScript Syntax: Case Sensitivity, Whitespaces, Comments, Semicolons, Literals, and Identifiers Quiz!

Quiz Question 1 of 5

Given the following JavaScript code snippet:

const filterKeys = (event) => { event = event || window.event; const charCode = event.charCode || event.keyCode; const char = String.fromCharCode(charCode); if (/[a-zA-Z0-9_\-\.@]/.exec(char)) { return true; } return false; }

Which of the following refactoring attempts could cause unintended results in the function's behavior due to improper whitespace handling?

Choose the correct answer below:

Skip Quiz Review Instruction