Ping Single Column Coming Soon Page using HTML CSS JS
Design comparison
Solution retrospective
Any suggestions or feedback is welcome.
Community feedback
- @PradneyaSPPosted about 1 year ago
const validEmail = (email) => { return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/.test(email); }
Can you please explain what is going on here😅
0@OversrPosted about 1 year ago@PradneyaSP I have a function assigned within a constant variable named validEmail, which takes a parameter (in this case I named it email but could be anything). Inside the function, i have a regex (the weird long line of symbols) that is tested against the parameter, and if the parameter matches, it will return true. If it does not match, it returns false. So basically it is a function that will tell whether the input is a valid email.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord