Category Archives: Javascript

JavaScript Events

What is an Event in JavaScript JavaScript is designed to interact with the HTML pages, and events are one of the main features that allow JavaScript to interact with HTML documents. An event is a signal or thing which tells that something happens to the HTML page or its elements. For example, when a page is loaded it’s… Read More »

JavaScript Function Expression and Literals

In the JavaScript Function tutorial, we learned how to define or declare a function using the function keyword. In this tutorial, we will learn about function literals, Expression, and Anonymous functions in JavaScript. A function literal is a method of defining an unnamed or anonymous function. By far, we define a function expression using the function keyword followed by… Read More »

JavaScript Function Parameters and Arguments

In the last JavaScript function tutorial, we learned about how we can define a function and parameters along with it. And in this tutorial, we will dive deep into the concept of JavaScript functions and arguments. Function Parameters and Arguments There is a subtle difference between the function parameters and arguments. Function parameters are the variable names that… Read More »

JavaScript Nested Functions and Closures

In the last JavaScript tutorial, we learned about JavaScript function Scope and how the global and local Scope and variables work in JavaScript. If you do not know what are global and local scopes please check that tutorial first, because in this tutorial we will be frequently referencing both terms. JavaScript Nested Functions In JavaScript, we can define… Read More »

Javascript Object Properties

Properties are the technical term for JavaScript name:value pairs. JavaScript Properties In the previous JavaScript tutorial, we learned what is an Object in JavaScript and how we define them. Just for a quick reference, a JavaScript object is a collection of name:valuepairs separated with commas, inside curly brackets. We can treat the individual name:value pair as a property… Read More »

JavaScript – Switch Case

In the last JavaScript tutorial, we learned about JavaScript if…else statements. Where we used if statement when we want to execute a block of code based on a single condition, if….else statement to execute either of one statement between two blocks of code based on a single condition, and if….else if….. statement when we have multiple conditions and… Read More »

JavaScript Function

A function is a container for a block of the code, that is used to perform a specific task. Using the function we can divide a big program into smaller modules or subparts. A function is like a small encapsulated block of code that can be called anywhere throughout the Program. There are two types of functions in… Read More »