Category Archives: ES6
Best Way To Validate Email In Javascript
Javascript is one of the most trending programming language these days. Be it frontend development or backend development, Javascript used widely in almost every field of web development. While the development of any websites or applications using the Javascript, we have to create a contact form, signup form, sign in form, or any other type […]
How to iterate over Javascript object properties
Here some very common tasks how to iterating over an JavaScript object properties If you have an object, you can’t just iterate it using map(), forEach() or a for..of loop. You will get the following errors: map() function will give you TypeError: items.map is not a function: forEach() function will give you TypeError: items.forEach is not a function: for..of will give you TypeError: items […]
When (and why) you should use ES6 arrow functions — and when you shouldn’t
Arrow functions are undoubtedly one of the more popular features of ES6. They introduced a new way of writing concise functions. Here is a function how is written in ES5 syntax: Now, here is the same function expressed as an arrow function: It’s much shorter! We are able to omit the curly braces and the […]