Question: Write JavaScript code to print the email address(es) exported from the following module. You need to pass a text string containing email addresses. As example,

Write JavaScript code to print the email address(es) exported from the following module. You need to pass a text string containing email addresses. As example, boleh firmansyah1404@mail.com minta kirim ke db.maulana@mail.com terimakasih bu Cindy Hartanto. Note that module file and the file using the module are two different files. No point assigned if the supplied code was not used as a module.

No points assigned if the supplied code is not used as a module.

// module "findemail.js"

export function findEmail(text) {

return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!