
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6710 Articles for Javascript

127 Views
WeakMap is a collection in JavaScript. This type of collection is used to store the data in the form of key-value pairs. In WeakMap, the key must be definitely an object and the values can be of any type. New function in weakMaps A new WeakMap is created using the ‘new’ key word dynamically. Syntax A new WeakMap is created using the syntax mentioned below. var weakMapName = new WeakMap() Example 1 This example demonstrates how to create a WeakMap using new operator in JavaScript − var wkMap = new WeakMap() if(wkMap){ console.log("WeakMap is created using ... Read More

447 Views
WeakMap is a collection in JavaScript. This type of collection is used to store the data in the form of key-value pairs. In WeakMap, the key must definitely be an object and the values can be of any type. The difference between a Map and a WeakMap is, in weakmap key must be an object and the other difference is that a weakmap is like a blackbox where the keys can’t be retrieved. The value of the weakmap can be accessed only if the key is known which means the values in the weakmap are private. Additional data can be ... Read More

418 Views
Web Garden is the web hosting system which comprises of multiple “processes”. This means that we have a single server on which we run multiple processes. This type of hosting provides logical scalability to our web applications.Web Farm is the web hosting system which comprises of multiple “computers”. This is different from web-garden as web garden runs on a single server while a web farm runs across multiple servers. This provides physical scalability to out web applications. This type of set up is achieved using Load balancers to balance calls coming to the server using a dedicated process that forwards ... Read More

6K+ Views
In JavaScript, window.onload and document.ready() are the methods used when the page is being loaded. Window.onload The window.onload method gets executed after the entire web page is loaded. This includes all the elements related with DOM like the head tag, tittle tag and all the other tags including the style sheets, images and videos. The onload method is used by passing a function to it. The called function will be executed after the object is loaded. Syntax This is the syntax of onload method − Window.onload = function() Window.onload = (event) => {} //arrow function Example 1 This example ... Read More

168 Views
In JavaScript, there are two different programming paradigms. The sloppy mode, sometimes referred to as the simple mode, is activated by default. We don't have to write the code strictly according to guidelines in this manner. On the other side, there is also the stringent mode. This setting allows the environment to have some rigid constraints. Strict mode has different meanings than regular code and is not a subset of sloppy mode. This article will explain how to enable strict mode in JavaScript and will also go over some of the features of "Strict" Mode. Syntax Different scopes can allow ... Read More

446 Views
This tutorial will explain you what are the different characteristics of JavaScript 'Strict Mode'. As such, there are two different modes of programming in JavaScript. By default, the simple mode or sometimes known as the sloppy mode is enabled. In this mode, we do not need to follow strict rules while writing the code. On the other hand, the strict mode is also there. This mode enables some strict rules in the environment. Strict mode is not a subset of the sloppy mode but it also has different semantics than normal code. Syntax Strict modes can be ... Read More

1K+ Views
The type of operating system used in the client machine can be detected using some of the functions in JavaScript. The different functions are discussed below. Using navigator.appVersion This property will return the information about the browser and the operating system being used in the form of a string. Syntax The syntax for the navigator.appVersion is given below. navigator.appVersion Example 1 This example demonstrates the usage of navigator.appVersion to detect client OS − Click to get the operating system Operating System ... Read More

3K+ Views
HTML stands for Hyper Text Markup Language, through the HTML we can design a block of webpages. Html is a frontend markup language that is used to build the content of frontend pages. It means that we can build a structure of web pages. Through HTML we can design the content of any website. It means that we can create headings, buttons, paragraphs, headers, footers, links, etc for any website. Example let’s try to understand to implement a program − Basic of ... Read More

155 Views
The parseInt function available in JavaScript has the following signature −parseInt(string, radix);Where, the paramters are the following −String − The value to parse. If this argument is not a string, then it is converted to one using the ToString method. Leading whitespace in this argument is ignored.Radix − An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the string.So we can pass the string and the radix and convert any numbner with base from 2 to 36 to integer using this method.Exampleconsole.log(parseInt("100", 10)) console.log(parseInt("10", 8)) console.log(parseInt("101", 2)) console.log(parseInt("2FF3", 16)) console.log(parseInt("ZZ", 36))Output100 8 ... Read More

82K+ Views
The read and write operations on a file can be done by using specific commands. The module required to perform these operations must be imported first. The required module is 'fs', which is called the File System module in Node.js Write Operation on a File After the File System file is imported then, the writeFile() operation is called. The writeFile() method is used to write into the file in JavaScript. Syntax writeFile(path, inputData, callBackFunc) Parameters The writeFile() function accepts three parameters as mentioned below. Path: The first parameter is the path of ... Read More