Beginner

How to write good “If” statements?

Writing a good code is an art and it can be useful in so trivial things that most developers often ignore. Usually, amateurs are programmed to write an ‘if’ statement which is always accompanied by an ‘else’ . However, it is important to realize that code quality can significantly be improved if else is omitted. […]

Why do you need a self-invoking function in JavaScript?

What is a Self-Invoking function? A self-invoking function is called immediately after definition. For example look at the following codes: [code lang=”javascript”] (function(){ // Called as soon as inserted console.log(“I am running”); })(); [/code] Why do you need a self-invoking function? A self-invoking function is an anonymous function and thus all the variables defined inside […]

Scroll to top