Unit testing: Why do I write them?
PublishedMany companies today want developers with unit testing experience. Even though unit testing had existed for many decades, some developers still don’t know how to write them. When I started coding as a self-taught developer, I didn’t come across unit ...
Mariam Reba Alexander
By now you have an understanding of Stored XSS attack and Reflected XSS attack, and some measures to prevent it. Now we will look into the last type of XSS attack, DOM based XSS attack. In the end, I will conclude with best practices to follow, testi...
Mariam Reba Alexander
In the last post I went through what is Cross-site scripting and Stored XSS attack, a type of cross-site scripting caused by stored javascript in database from user inputs. If you haven't read it, here is the link. As frontend developers we are cons...
Mariam Reba Alexander
As frontend developers we are constantly adding and releasing new features or fixing bugs as per business requirements, and it's hard to keep vigilance on the security side of things. It has become a secondary concern and we are far behind the backen...
Mariam Reba Alexander
Break and continue in Javascript
PublishedYou would have probably used break or continue in your javascript code at least once. Break and continue in javascript are known as jump statements. Let's look into both the statements. break The break statement causes the innermost enclosing loop or...
Mariam Reba Alexander
Here are some javascript tips on property check, string comparison & check for defined that you can use in your code. Property check We know that the method hasOwnProperty() can be used for checking whether a property exists in an object like the...
Mariam Reba Alexander
In the last post part 1 - for loop, I described how for loop works and shared some common and rare examples of it. Now let's look into the other types of loop: for/of and for/in loops. for/of The for/of loop is fairly new defined by ES6 and is comple...
Mariam Reba Alexander
You may have used for loop, for/of and for/in a million times on your code and you probably know by now that it is used for iterating an array or object keys (or values) and execute some code within the looping statements. Javascript has five looping...