- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ayush Gupta has Published 541 Articles
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
472 Views
In this tutorial, we will be discussing a program to find two numbers (say ‘a’ and ‘b’) such that botha+b = N and a*b = N are satisfied.Eliminating ‘a’ from both the equations, we get a quadratic equation in ‘b’ and ‘N’ i.eb2 - bN + N = 0This equation ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
1K+ Views
Regardless of the programming language, memory life cycle is pretty much always the same −Allocate the memory you needUse the allocated memory (read, write)Release the allocated memory when it is not needed anymoreThe second part is explicit in all languages. Use of allocated memory needs to be done by the ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
454 Views
Regardless of the programming language, memory life cycle is pretty much always the same −Allocate the memory you needUse the allocated memory (read, write)Release the allocated memory when it is not needed anymoreThe second part is explicit in all languages. Use of allocated memory needs to be done by the ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
564 Views
In the JavaScript, Event Flow process is completed by three concepts −Event Target − The actual DOM object on which the event occured.Event Bubbling − Explained belowEvent Capturing − Explained belowEvent bubbling is the order in which event handlers are called when one element is nested inside a second element, ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
179 Views
The String object lets you work with a series of characters; it wraps Javascript's string primitive data type with a number of helper methods. As JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive.Following ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
177 Views
The split([separator, [limit]]) method splits a String object into an array of strings by separating the string into substrings, using a specified separator string to determine where to make each split.Example usage of split methodlet a = "hello, hi, bonjour, namaste"; let greetings = a.split(', '); console.log(greetings)Output[ 'hello', 'hi', 'bonjour', ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
1K+ Views
Camel case is the practice of writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, with no intervening spaces or punctuation. For example, Concurrent hash maps in camel case would be written as −ConcurrentHashMapsWe can implement a method to accept ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
95 Views
Using for..in loops in JavaScript with array iteration is a bad idea because of the following behavior −Using normal iteration loops −Examplelet arr = [] arr[4] = 5 for (let i = 0; i < arr.length; i ++) { console.log(arr[i]) }Outputundefined undefined undefined undefined 5If we had iterated over ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
136 Views
JavaScript classes, introduced in ES6, are syntactical sugar over JavaScript prototype-based inheritance. Classes are in fact "special functions". You can define classes in JavaScript using the class keyword using the following syntax −class Person { // Constructor for this class constructor(name) { this.name = name; ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
181 Views
The \W metacharacter is used to find a non-word character.A word character is a character from a-z, A-Z, 0-9, including the _ (underscore) character.Example// Containing any non word character: console.log(/\W/.test(" ")) console.log(/\W/.test(".!@#")) // Not containing non word characters: console.log(/\W/.test("a")) console.log(/\W/.test("B")) console.log(/\W/.test("9")) console.log(/\W/.test("_"))Outputtrue true false false false falseRead More