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

Promise + gì

promise + gì

try/catch es10

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

Random Number javascript

Random Number javascript

Async await in javascript

Async await in javascript

Getting the last element of a split string array

Getting the last element of a split string array