Challenge 2 — Solution Task: Write the contents of a file validator.js with a default export — a function isValidEmail(email) doing a simple check for the presence of "@" and ".". Then write main.js importing it under the name checkEmail (a different name than it was defined with) and testing it with two example strings. // validator.js export default function isValidEmail(email) { return email.includes('@') && email.includes('.'); } // main.js import checkEmail from './validator.js'; console.log(checkEmail("philip@example.com")); console.log(checkEmail("not-an-email")); Expected output: true false Notes: - Even though the function was defined as isValidEmail in validator.js, importing it as checkEmail works perfectly — a default export has no fixed name on the importing side, unlike a named export, which must be imported using its exact original name. - includes() (a String method) checks whether a substring appears anywhere in the string — this is intentionally a very simple validity check, not real email validation. - Only ONE default export is allowed per file — trying to add a second "export default" in validator.js would be a syntax error.