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 số phần tử trong mảng JavaScript
Đếm số lần xuất hiện của các phần tử trong mảng JavaScript
So sánh hai array trong javascript
Làm thế nào để đánh giá xem hai mảng có bằng nhau không? Có hai cách đó là sử dụng JSON.stringify() hoặc toString()
Detect when your site is visible to users
Detect when your site is visible to users
group by property javascript use reduce
group by property javascript use reduce
Spread Operator for Objects
Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.