
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

7K+ Views
JSON is a powerful data format to exchange data from server to client and vice versa. Many time JSON data is received in a String format and we need to convert it to a usable JSON object. In this process, it’s an important requirement to convert string data into Date format. In this article, we will learn how to convert JSON results into a Date string using Javascript. The JSON objects contain the date like this − { name: "John", time: '/Date(1559072200000)/' } And the result will be − Wed May 29 2019 ... Read More

5K+ Views
We can use jQuery.makeArray() method or jQuery.each() method to convert a list of elements into an array using jQuery. The makeArray() method is most convenient way to perform this task. This method is used to convert an object into a native array. Using jQuery makeArray() method The $.makeArray() method in jQuery converts an array-like object into a JavaScript array. It takes a single argument and convert it to array. The following is syntax of $.makeArray() method- $.makeArray(obj) Here obj is an object that we want to convert to an array. Here are the steps ... Read More

10K+ Views
To convert JSON string to array of JSON objects using JavaScript is necessary because JSON strings can not be directly modified or manipulated, so we need this conversion which allows us to access, modify and iterate over each item. We will be discussing three different approaches for this conversion from JSON strings to array of JSON objects. In this article we are having JSON string, our task is to convert JSON string to array of JSON objects using JavaScript. Approaches to convert JSON string to objects Here is a list of approaches to convert JSON string to array of JSON ... Read More

9K+ Views
We can use the Object.values() method, Array puch() method and for…of loop to convert Object’s array to an array using JavaScript. First we access each object using for…of loop and then apply the Object.values() method to access the values of individual object. Then use the Array push() method to add the values to the array. In this article, we will discuss in this approach in detail. Let’s have a look at the example to get an understanding about the problem. You have given an array of objects and the task is to convert the array of object into array ... Read More

60K+ Views
JSON (JavaScript object notation) is a powerful data format to exchange data from server to client and vice versa. HTML tables are powerful tools to represent data in tabular format so that it becomes very easy to read, analyze and compare. It is very common in web development to convert JSON data into HTML tables. In this article, we will learn how to convert JSON data into HTML tables using Javascript as well as jQuery. By the end of this article, you will have a solid understanding of JSON to HTML table conversion. Convert JSON data into HTML tables using ... Read More

2K+ Views
Date time manipulation in JavaScript is important while dealing with databases. JavaScript Date and time are different from the MySQL date and time. JavaScript provides multiple ways to represent Date and time none of these formats are the same as MySQL's date and time format. In this article, we will discuss some approaches to converting JS date and time into MySQL date and time format. First of all, we will understand the difference between Javascript and MySQL date and time formats. Here is an example − Javascript − ISO 8601 Date Format : YYYY-MM-DDTHH:mm:ss.sssZ MySQL − ISO ... Read More

3K+ Views
The Window object, known as the Global TypeScript object, represents the current web page in a browser window. The location, history, and document of the current page, as well as other methods and attributes, can all be accessed and controlled using this method. The Navigator object is a property of the Window object. It contains information about the browser and device used to visit the website, including the user agent, platform, and language. TypeScript's Window.navigator object can receive information about the device browser and perform operations on those objects. The Window and Navigator objects can be used in TypeScript by ... Read More

604 Views
The programming language TypeScript is based on JavaScript and is strongly typed, object-oriented, and compiled. The language is improved with tools like static typing, classes, and interfaces that help with early error detection and make JavaScript more manageable. One of TypeScript's features is the ability to enforce the types of an object's indexed members, and this process is also referred to as an index signature. An index signature is a set of key-value pairs describing the many properties an object may have. The type of the property name and the type of the property value are specified, respectively, using the ... Read More

219 Views
Before developing the actual generic class, let's first learn about the Generic class. A TypeScript class known as generic may deal with numerous types of data. It is a variety of arguments and is displayed using angle brackets (). This represents the kind of data the class will use to achieve this. The type argument can then be used in the class's properties and functions to make the class flexible and reusable with other data types. We will be briefing a little bit. Suppose, in an example, the type parameter is denoted as "T" and the property "value" of the ... Read More

1K+ Views
We can use the try-catch statements to solve errors in TypeScript. Sometimes, we require adding more than one try-catch block in the code to handle multiple errors. When we add multiple try-catch statements in the code, the code becomes unreadable, and it becomes a headache for developers to refactor. In this tutorial, we will learn to convert too many try-catch blocks into a single try-catch block which can manage multiple errors. Syntax Users can follow the syntax below to use the single try-catch block in TypeScript. try { throw new Error("error_message"); // this code ... Read More