What does call, apply and bind functions do in JavaScript?

In this article, we will learn about what call , apply and bind functions are in JavaScript and how they are different from each other. These functions are available on all JavaScript functions as they are defined on the prototype of Function class. call – The call method allows you to call a function with a given context ( this ) and arguments. This gives you an ability to call a function with different objects. Syntax, [arg1, arg2, arg3, …]); thisArg is optional. If not provided then global object will be used i.e. in case of browser the window object. In strict mode, if thisArg is not provided then this inside someFunc will be undefined. arg1, arg2, arg3, … are optional. Examples Calling a function with different objects. function   sayHello ( hostName ) {      console . log ( `Hello  ${this . firstName }   ${this . lastName }  from  ${ hostName  ?  hostName  :  'TheAconiteDev' } ` ); }   let   person1  = {

Is competitive programming required to become a good software engineer?

Before we answer the question asked in the title, it is necessary to understand what competitive programming is? Why people are doing it? And what do they get from it? Once we answer these questions, we will be in a good position to conclude whether competitive programming is really required to become a good software engineer. What is competitive programming? Competitive programming is like a contest or sport where you will be given a problem statement which you have to solve using your preferred programming language in least amount of time. In the above statement, we would like you to pay attention to two things Preferred programming language Least amount of time We asked for your attention on these two because we believe that competitive programming teaches you a lot about them, let’s see how. Preferred programming language In a programming competition, you do not jump in with working knowledge of dozens of programming language. If you do that, you are bound to get one of the last

How to be an efficient developer?

“How do I become more efficient or productive developer?”. This statement has been in the heads of many developers (most probably you also) especially at junior or mid levels. Before answering this question, let us understand what is the source of this question and why people are asking this in the first place? Answer to this, in our opinion, is fairly simple and can be laid down as follows: To increase their output per working hour or to simplify, get things done in or well before the given timeframe. It will eventually help them in balancing their personal and professional life. To have a good career growth and respect in their workplace. Both the points above are completely valid and achieving these will be a win-win situation for both the developer and their employer/client. Let’s move forward and talk about what kind of situations a developer will be in. Since we are talking about the developers at junior and mid levels, we aren’t going to talk about requirement gathering and