Fun with Functions : The JavaScript Way – Part 2

Now let’s start from where we left. Let us understand few more concepts in functions.

4. Passing variable number of arguments to a function

In JavaScript, and in few other languages it is possible to send multiple number of arguments to the same function. Usually in general if our functions accepts two arguments, then while calling the function, we pass only two parameters. But in this case we can pass any number of parameters to the function. See the below code snippet.

Continue reading “Fun with Functions : The JavaScript Way – Part 2”

Variable Declaration: var vs let vs const

In JavaScript and after the release of ES6 we have three ways to declare variables in JavaScript. These are var, let and const. Each of them have different scopes and different properties. It is worth the time and effort to understand the differences between these keywords.

Continue reading “Variable Declaration: var vs let vs const”

Understanding Scopes in JavaScript

One of the most important concepts in JavaScript, which one should master, is scope. Scopes are a little different in JavaScript compared to other languages like C# or Java. Scope defines the lexical memory space in which a variable, function or object is accessible for the JavaScript interpreter for it’s use during the run-time.

Continue reading “Understanding Scopes in JavaScript”

Fun with Functions : The JavaScript Way – Part 1

JavaScript as we all know is one of the most versatile yet most unknown language to developers. There a lot of functionality that is given to us by the mighty JavaScript. And it’s very easy for developers to over look the roads less traveled in JavaScript. Today I will show you one such road. The JavaScript functions. Functions being the bread and butter of JavaScript plays a huge role. Join me in this blog and let’s have some fun with functions.

Continue reading “Fun with Functions : The JavaScript Way – Part 1”

Deep Dive into the JavaScript’s Console

Hello reader,

Today we will look into JavaScript’s console class. We, the developers, have been using the console for debugging our JavaScript code. But most of us only use the log method i.e., console.log(‘some message’). Is it all that the console class gives us? No, definitely not. In fact, it has a vast pool of functions that we as developers should know how to harness.  And today I will tell you a few more bell and whistles that javascript gives us.Continue reading “Deep Dive into the JavaScript’s Console”