
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

222 Views
To check if a string can be formed from another string by at most X circular clockwise shifts, we can calculate the difference of ASCII value of the characters and then compare it with the X. Circular clockwise shifts for the string mean rotating the characters of the string to their next character in alphabetic order. In this article, we are given with a string, target and a number which represent the number of circular shifts to be made. Our task is to write a JavaScript program to check if the target can be formed from the string by at ... Read More

248 Views
A doubly linked list is a linear data structure where each node stores the address of the next and previous node. We have given a doubly linked list and we have to rotate the doubly linked list by N nodes and print it. Here N is the positive number and less than or equal to the count of the nodes present in the linked list. We are not given the specific side to rotate the doubly linked list. So we will rotate the doubly linked list in both ways. Rotating Doubly Linked List to Counter Clockwise We have to rotate ... Read More

298 Views
To check if a string can be obtained by rotating another string by 2 places, we have used Javascript substr() method. We will be understanding the code with an example and step wise explanation of the code. In this article we are having two strings: str1 and str2, where str1 is the given string and str2 is the rotated string. Our task is to check if the string (str2) can be obtained by rotating another string (str1) by 2 places. Example Input: str1 = TutorialsPoint str2 = torialsPointTu Output: true (with 2 left rotations) Input: ... Read More

194 Views
Rotating a string means moving the characters of the string to their left or right side by one index and one end may contain the value stored at the other end. We will be given two strings and we have to rotate the second string either in the left or the right direction by given number (d) times and check if both strings are equal or not. We will write proper code with comments, explanations, and detailed discussions on the time and space complexity of the program. Examples If we have the given string ‘abcdef’ and the other string is ... Read More

1K+ Views
jQuery is a popular JavaScript library that simplifies HTML DOM traversal, event handling, and AJAX interactions for rapid web development. It offers a wide range of built-in functions and methods that help developers to manipulate HTML elements, styles, and behaviors dynamically. In this article, we will see how to select all links inside a paragraph using jQuery. Selecting links inside a paragraph is a common requirement when we want to modify the links in a particular section of our website, such as changing styles, finding links, etc. How to select all links inside the paragraph? Selecting links inside the ... Read More

2K+ Views
A JavaScript asynchronous function is a function that runs independently of the main flow of the program. This allows the program continues executing other code while the async function is running. Async is used to declare an async function, which runs asynchronously, and await is used to pause the execution of the function until a specific asynchronous task is achieved. Method to create an Asynchronous function Using async keyword The simplest way to create an asynchronous function is to use the async keyword before the function declaration. See the below syntax − Syntax async function fetchData() { ... Read More

2K+ Views
Web development is a rapidly evolving field, and Microsoft's Blazor framework is one of the latest entrants in the arena. Blazor is a client-side web framework that allows developers to build web applications using C# and .NET instead of JavaScript. While JavaScript frameworks like Angular, React, and Vue.js have been popular choices for web development for many years, Blazor offers some unique advantages that make it an attractive alternative. In this article, we will discuss how blazor framework may be considered better than JavaScript frameworks, including language familiarity, rendering, code sharing, tooling, security, etc. We’ll also know about the ... Read More

6K+ Views
JavaScript is a versatile language that is widely used for creating dynamic web applications. One of the most common data structures used in JavaScript is the array. An array is a collection of elements that can be of any type, including objects. In this article, we will discuss how to create an array with multiple objects having multiple nested key-value pairs in JavaScript. What are arrays? An array is a special type of object that stores a collection of values. These values can be of any data type, such as numbers, strings, booleans, and even other arrays. Arrays are a ... Read More

362 Views
To rotate a matrix by 180 degrees, can be achieved using various approaches. We have discussed three different approaches in this article with stepwise explanation of codes and examples. In this article, we are having a 2D square matrix, our task is to write a JavaScript program to rotate a matrix by 180 degrees. Example Input: matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]] Output: [[16, 15, 14, 13], [12, 11, 10, 9], [8, 7, 6, 5], [4, 3, 2, 1]] Approaches to Rotate a Matrix ... Read More

216 Views
Reversing a linked list means arranging all the nodes of the linked list in the opposite manner as they were present earlier or moving the elements present at the last of the linked list towards the head and head nodes towards the tail. Alternate K nodes reversing means reversing the first k elements and then keeping the next k elements the same and again reversing the next k elements and so on. We will see the codes with the different approaches and explanations for each of them. For example If the given linked list is the: 1 ... Read More