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

Làm phẳng mảng dùng phương pháp đệ quy

Làm phẳng mảng dùng phương pháp đệ quy

Getting the last element of a split string array

Getting the last element of a split string array

Spread Operator for Objects

Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.

Merge Array

How to combine two sorted arrays into one? We can do this easily with the spread operator.

await axios get

await axios get