kiểm tra email trong javascript

tipjs,funciton

kiểm tra email trong javascript

const checkEmail = data => {
  const reg = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/g
  if (reg.test(data)) return true
}

Có thể bạn đã miss một số snippets code

Converting Object to an Array

Converting Object to an Array

using javascript callback style error handling

try/catch es10

An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.

JavaScript: async/await with forEach

JavaScript: async/await with forEach()

Await in a for loop

How to Await in a for loop