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

Đếm có bao nhiêu items giống nhau trong một array

reduce javascript. Đếm có bao nhiêu items giống nhau trong một array

Extend Object javascript

Extend Object javascript

encode/decode base64 with JS

Encoding to base64 is done with the btoa command

Getting the last element of a split string array

Getting the last element of a split string array

Sử dụng reduce và concat làm phẳng một array

Array.reduce() và Array.concat() có thể giúp chúng ta làm phẳng một Array như: