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 in javascript

promise in javascript

JavaScript: async/await with forEach

JavaScript: async/await with forEach()

Merge Array

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

Getting the last element of a split string array

Getting the last element of a split string array

Lấy tháng hiện tại trong javascript

Lấy tháng hiện tại trong javascript