ItsMyCode
  • How To
  • Python
    • Basics
    • Advanced
    • Built-In Methods
    • Dictionary Methods
    • String Methods
    • List Methods
    • Date and Time
    • Files and Folders
    • Matplotlib
    • Seaborn
    • NumPy
    • Pandas
    • SciPy
    • Errors and Exception
    • Django
  • R
  • Git
  • Powershell
  • Javascript
  • C#
    • Sitecore
  • Node.js
ItsMyCode

Coding Simplified

  • How To
  • Python
    • Basics
    • Advanced
    • Built-In Methods
    • Dictionary Methods
    • String Methods
    • List Methods
    • Date and Time
    • Files and Folders
    • Matplotlib
    • Seaborn
    • NumPy
    • Pandas
    • SciPy
    • Errors and Exception
    • Django
  • R
  • Git
  • Powershell
  • Javascript
  • C#
    • Sitecore
  • Node.js
541
98
0

Home » Javascript

Browsing Category

Javascript

28 posts

Modern JavaScript Tutorial: simple, but detailed explanations with examples and tasks, including: closures, document and events, object oriented programming

Fatal Error: Ineffective Mark-Compacts Near Heap Limit Allocation Failed - Javascript Heap Out Of Memory
  • Python
  • Errors and Exception
  • Javascript
  • Node.js
  • 2 minute read

[Solved] fatal error: ineffective mark-compacts near heap limit allocation failed – javascript heap out of memory

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 20, 2022
The fatal error: ineffective mark-compacts near heap limit allocation failed – javascript heap out of memory occurs if there is any memory leak or the application consumes a lot of…
View Post
Crbug/1173575, Non-Js Module Files Deprecated
  • Javascript
  • 2 minute read

[Solved] Crbug/1173575, non-JS module files deprecated.

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • March 10, 2022
The error Crbug/1173575, non-JS module files deprecated occurs basically when you are running the projects in VSCode with launch.json for debugging the application. In this tutorial, we will check what is Crbug/1173575, non-JS…
View Post
Unable To Resolve Dependency Tree Error When Installing Npm Packages
  • Javascript
  • Node.js
  • 3 minute read

Unable to resolve dependency tree error when installing npm packages

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • March 2, 2022
If you install the node modules using the latest node.js and npm version 7, you will get an error Unable to resolve dependency tree error when installing npm packages.  In this…
View Post
Error:0308010C:digital Envelope Routines::unsupported
  • Node.js
  • Javascript
  • 2 minute read

[Solved] error:0308010C:digital envelope routines::unsupported

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • July 21, 2022
The error:0308010C:digital envelope routines::unsupported is mainly observed while creating the react application using the Node.JS version 17 or above and using the webpack@4 version. In this tutorial, we will look at what…
View Post
Uncaught Syntaxerror: Cannot Use Import Statement Outside A Module
  • Javascript
  • 2 minute read

[Solved] Uncaught SyntaxError: cannot use import statement outside a module

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • January 30, 2022
The Uncaught syntaxerror: cannot use import statement outside a module occurs if you have forgotten to add type=”module” attribute while loading the script or if you are loading the src…
View Post
Prismjs Tutorial Implement Prism In Html And React
  • Javascript
  • 4 minute read

PrismJS Tutorial | Implement Prism in HTML and React

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • November 24, 2021
PrismJs is a library written using JavaScript, which is used for syntax highlighting or code highlighting. It’s one of the most popular libraries used by millions of websites to highlight…
View Post
Number.isinteger() - Javascript
  • Javascript
  • 3 minute read

Number.isInteger() – JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • November 24, 2021
In JavaScript, Number.isInteger() method checks whether the passed value is an integer or not. The method isInteger() returns true if the provided value is an integer or type number. Otherwise, it returns false. Syntax…
View Post
Javascript
  • How To
  • Javascript
  • 1 minute read

How to create a JavaScript Dictionary and add key value pairs

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Dictionary objects are very useful in any programming language. In this article let’s see how to create a JavaScript Dictionary and add key-value pairs. Many programming languages like C# and…
View Post
Sitecore
  • Javascript
  • How To
  • Sitecore
  • 1 minute read

How to detect Page Editor mode in Sitecore through code

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 26, 2021
f you are a Sitecore developer then definitely in many instances you would need to show or hide some components in the Page Editor mode. So How to detect Page…
View Post
Javascript
  • Javascript
  • 2 minute read

Difference between Equality Comparisons == and === in JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Often developers are confused between the JavaScript Equality Operators. In this article we will look How many types of Equality Comparison Operator are there and What is the difference between Equality…
View Post
Javascript
  • How To
  • Javascript
  • 2 minute read

Parse JSON string in JavaScript using JSON.parse()

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
JSON or JavaScript Object Notation is a very lightweight data-interchange format. It’s also language independent and easy to understand. In this article, we will look into How to Parse JSON…
View Post
Javascript
  • How To
  • Javascript
  • 2 minute read

Empty an Array with JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Empty an Array with JavaScript is the common task which every developer performs. Most of the developers use the wrong approach of emptying the array in JS. Method 1: Empty…
View Post
Javascript
  • Javascript
  • How To
  • 1 minute read

Append Values into an Array in JavaScript using push() method

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Most of the JavaScript developers come across this scenario where they need to insert or append the values into an existing array. You could Append Values into an Array in…
View Post
Javascript
  • Javascript
  • How To
  • 1 minute read

Creating multiline strings in JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
There are many ways where we could easily create multiline strings using JavaScript. Some of the best methods are listed in the below examples. Creating multiline strings in JavaScript can…
View Post
Capitalize The First Letter Of String Using Javascript
  • Javascript
  • 1 minute read

Capitalize the first letter of string using JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • January 14, 2022
If you come across a scenario where you need to Capitalize the first letter of string using JavaScript then you could easily perform this in one-liner using built-in string methods…
View Post
Create Guid/Uuid In Javascript
  • Javascript
  • 2 minute read

Create GUID/UUID in JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • January 14, 2022
There might be situations where you would be creating GUID in Javascript, Currently JavaScript doesn’t have any Built-in method to generate the GUID/UUID. We could use Math.random() or Date().getTime() and…
View Post
Javascript
  • Javascript
  • How To
  • 2 minute read

Measure JavaScript Execution time console.time() and console.timeEnd()

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Debugging the JavaScipt code to identify performance issue is a very tedious task. There are built-in JavaScript methods which you could use to measure the performance and the time taken…
View Post
Javascript
  • Javascript
  • How To
  • 1 minute read

How to Submit a Form using JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
The easiest way to submit a form using JavaScript is by using HTMLFormElement.submit() method. This method does something similar to activating a submit button of the form. If a form…
View Post
Javascript
  • How To
  • Javascript
  • 3 minute read

How to work with Arrays in Javascript with examples

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
JavaScript arrays are used to store multiple values in a single variable. JavaScript Array object is a global object that is used in the construction of arrays; which are high-level,…
View Post
Javascript
  • How To
  • Javascript
  • 2 minute read

Detect If Internet Connection Exists with JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
There are times when the user might be browsing and loose the internet connectivity all of a sudden or user might be doing an offline browsing which comes basically from HTML…
View Post
Javascript
  • Javascript
  • 1 minute read

Scope of variables in JavaScript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
What is the scope of variables in Javascript? Scope in javascript refers to the variables and the functions which are accessible and in what context it will be executed. There are…
View Post
Javascript
  • How To
  • Javascript
  • 1 minute read

Javascript URLEncode

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Let us take a look at what would be the best approach for Encoding URL using Javascript. There are basically 3 Javascript URLEncode methods available. Types of Javascript URLEncode escape()…
View Post
Javascript
  • How To
  • Javascript
  • 1 minute read

Javascript code to disable mouse right click

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
You could use Javascript code to disable mouse right click on the webpage. This article demonstrates two methods to disable the context menu with the right click of a mouse…
View Post
Javascript
  • How To
  • Javascript
  • Jquery
  • 2 minute read

How to detect if document has loaded using Javascript or Jquery

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 28, 2021
A page can’t be manipulated safely until the document is “ready.” You might come across various scenarios where you need to call some function or perform some tasks only after…
View Post
Javascript
  • How To
  • Javascript
  • 1 minute read

How to get query string values using JavaScript?

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • January 22, 2022
Here is a very simple method to get query string values using javascript. Below code snippet can be used to fetch the query string value in the URL when the…
View Post
Javascript
  • How To
  • Javascript
  • Jquery
  • 1 minute read

How to redirect page using Javascript or Jquery

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 25, 2021
Redirect Page using Javascript There are multiple ways in JS to redirect page using javascript. The best way is to use window.location.href as it preserves the history when you hit…
View Post
Javascript
  • How To
  • Javascript
  • 1 minute read

How to check if string contains another substring

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • September 24, 2021
The easiest way to check if the string contains another substring is by using indexOf() Javascript method. The indexOf() method returns the position of the first occurrence of the specified…
View Post
Javascript
  • Javascript
  • 1 minute read

Get absolute URL using Javascript

  • Avatar Of Srinivas RamakrishnaSrinivas Ramakrishna
  • August 26, 2021
Below is the simple method to get absolute URL using javascript. This code can be run on the Browser Console directly. Open the developer tools and navigate to console tab…
View Post
  • Metrics Converter
  • Sitemap
  • Privacy Policy
  • Cookie Policy
  • Contact Us
541
98
0
0
ItsMyCode
Copyright © 2022· All Rights Reserved