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ấy tháng hiện tại trong javascript
Lấy tháng hiện tại trong javascript
Await in a for loop
How to Await in a for loop
Đế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
flatMap()
Use flatMap() creates a new array with sub-array elements flattened by specified depth.
Rest Operator for Objects
Now we can use rest on the properties of an Object. It allows us to explicitly extract certain named variables, and assign any uncalled variables into a catchall Object.