Category: 01. Javascript

  • Strict Mode

    Strict Mode in JavaScript In JavaScript, the strict mode is introduced in the ES5 (ECMAScript 2009). The purpose behind introducing the “strict mode” is to make the JavaScript code more secure. The ‘use strict‘ literal expression is used to add the strict mode in the JavaScript code. It removes the silent errors from the code, such as…

  • Type Conversions

    JavaScript Type Conversions Type Conversions in JavaScript refer to the automatic or explicit process of converting data from one data type to another in JavaScript. These conversions are essential for JavaScript to perform operations and comparisons effectively. JavaScript variables can contain the values of any data type as it is a weakly typed language. There are…

  • Data Types

    JavaScript Data Types Data types in JavaScript referes to the types of the values that we are storing or working with. One of the most fundamental characteristics of a programming language is the set of data types it supports. These are the type of values that can be represented and manipulated in a programming language. JavaScript data…

  • Constants

    JavaScript Constants JavaScript constants are the variables whose values remain unchanged throughout the execution of the program. You can declare constants using the const keyword. The const keyword is introduced in the ES6 version of JavaScript with the let keyword. The const keyword is used to define the variables having constant reference. A variable defined with const can’t be redeclared, reassigned. The const declaration have block…

  • let Statement

    What is JavaScript let statement? The JavaScript let statement is used to declare a variable. With the let statement, we can declare a variable that is block-scoped. This mean a variable declared with let is only accessible within the block of code in which it is defined. The let keyword was introduced in the ES6 (2015) version of JavaScript. It is an…

  • Variables

    JavaScript Variables JavaScript variables are used to store data that can be changed later on. The ariables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. Before you use a variable in a JavaScript program, you must declare it.…

  • Comments

    JavaScript Comments JavaScript comments are used to explain the purpose of the code. The comments are not executed as a part of program and these are solely meant for human developers to understand the code better. You can use comments for various purposes, such as − A good developer always writes a comment to explain the code.…

  • Console.log()

    JavaScript console.log() method The console.log() is one of the most important methods in JavaScript. It is used to print the message in the web console. We can use the console.log() method to debug the code by printing the output in the console. For example, if the developer requests API and wants to check the data…

  • Hello World Program

    Write “Hello World” Program in JavaScript “Hello, World!” is often the first program, programmers write when learning a new programming language. JavaScript “Hello World” is a simple program, generally used to demonstrate the basic syntax of the language. This program will make use of different JavaScript methods to print “Hello World”. Using document.write() In JavaScript,…

  • Syntax

    JavaScript Syntax JavaScript syntax comprises a set of rules that define how to construct a JavaScript code. JavaScript can be implemented using JavaScript statements that are placed within the <script>… </script> HTML tags in a web page. You can place the <script> tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should…