JavaScript startsWith() method | Explained with Examples

Posted: 2021-12-03 06:32:51
Source: https://linuxhint.com/javascript-startswith-method/

The startsWith() method is an inbuilt method of string class in JavaScript that searches a substring in the original string and returns a true value if the substring is present at the start of the original string otherwise it returns false. The startsWith() method is case sensitive, does not change the original string and the first character of the string at index 0 and second at index 1, and so on.

Popup boxes in javaScript

Posted: 2021-12-03 06:29:02
Source: https://linuxhint.com/popup-boxes-in-javascript/

JavaScript offers us three kinds of pop-up boxes which are used to show a message, warning, or notification to a user using our web application or webpage. The three popup boxes are alert, prompt, and confirm box. The alert popup box is used to show a warning to a user whereas the prompt popup box is used to take input from the user and the final confirm box is used to take permission from a user.

Promises in JavaScript | Explained

Posted: 2021-12-03 06:24:16
Source: https://linuxhint.com/promises-in-javascript/

A promise is an operation that is completed in the future and helps developers to implement asynchronous code. Promises are preferred over callback functions as promises are much cleaner hence improving readability and debugging of the code. It has better error handling as well as multiple asynchronous operations are better handled with promises. A promise can be fulfilled, rejected or it is pending. This post explains Promises in JavaScript and discusses Promises with the help of an example.

Template Literals in JavaScript | Explained

Posted: 2021-12-03 06:16:00
Source: https://linuxhint.com/template-literals-javascript/

Template Literals gives us the ability to work with strings with more control and more power over the traditional string data type. Unlike strings, Template Literals use backticks `` rather than single or double quotation marks. This post explains what Template Literals are in JavaScript along with the features Template Literals offer us over the standard JavaScript string.

Kubernetes Jsonpath with Examples

Posted: 2021-12-03 06:11:57
Source: https://linuxhint.com/kubernetes-jsonpath/

When dealing with Kubernetes in a production setting, you’ll need to see information on hundreds of nodes and thousands of items. Going through thousands of these resources to find exact information would be a daunting task. Kubectl includes Jsonpath option which makes filtering data across big data sets a breeze.

Ubuntu Vs. Windows

Posted: 2021-12-03 06:09:47
Source: https://linuxhint.com/ubuntu-vs-windows/

Ubuntu is a Debian-based free and open-source Linux distribution. Ubuntu combines all the characteristics of a Unix operating system with a customized graphical user interface. Microsoft's Windows is a multitasking operating system where users can execute many things at the same time by opening multiple windows on the same computer.

What Is AJAX?

Posted: 2021-12-03 06:04:56
Source: https://linuxhint.com/what-is-ajax/

AJAX is a method that helps in implementing asynchronous execution of the code in JavaScript. In asynchronous execution a statement or a line of code does not have to wait for the finishing of the previous line of code and both can execute parallel. AJAX is used to transmit and receive data from the server asynchronously without affecting the rest of the page. This post explains what AJAX is and then we went to see how AJAX works by describing the process stepwise with an example to make your concept clearer.

What is JSON

Posted: 2021-12-03 06:01:01
Source: https://linuxhint.com/what-is-json/

JSON is one of the most widely used applications to exchange the data between client and server, which is also lightweight, easily readable, and independent of any computer language. It is a data format following a specific syntax to define data objects. It is written in human-readable, structured text format. This article briefly explains what JSON and for what purpose it was created. Syntax of JSON format and a few handy tools are also discussed in this guide to work with JSON.

How To Use Object Methods in JavaScript?

Posted: 2021-12-03 05:56:02
Source: https://linuxhint.com/object-methods-javascript/

An object is something that holds properties and attributes and in JavaScript, it stores key-value pairs. The syntax myObj.methodName() is used to call a method on an object. JavaScript also offers us some built-in methods of the global Object such as Object.create(), Object.values(), Object.keys(). The Object.create() method creates a new object with the specified object prototype, Object.keys() returns an array of the object keys whereas Object.values() returns an array of Object values.

How to submit a form using JavaScript

Posted: 2021-12-03 05:51:22
Source: https://linuxhint.com/submit-form-using-javascript/

To submit a form, create an HTML tag to initialize a form and then define two input fields and a button. Next, access the form element inside a javascript file and then retrieve the values of form input fields using the id attribute. In the end, initiate an event listener that will listen for the submit event, and whenever a user clicks on the submit button, this event will be fired.

How to restart a network on Linux Mint

Posted: 2021-12-03 05:47:40
Source: https://linuxhint.com/restart-network-linux-mint/

There are various situations where you need to restart the network on Linux Mint. There are times when you are unable to connect to the internet, or your network connection is slower than it should be. Then try to restart your network, which is one of the most basic approaches to resolve such problems. This article explains how to restart a network on Linux Mint using different approaches, such as restarting a network using GUI, and terminal commands like nmcli, and nmtui.

How To Modify CSS Classes in JavaScript

Posted: 2021-12-03 05:43:30
Source: https://linuxhint.com/modify-css-classes-javascript/

JavaScript offers us two properties that we can use to modify CSS classes; classList and className property. The className property is used to set a value to a CSS class directly whereas the classList gives us some built-in methods to manipulate the CSS classes. The classList.add() gives us the ability to add class values, classList.remove() gives us the ability to remove a class, classList.toggle() gives us the ability to add toggling to a class and the classList.replace() gives us the ability to replace a class value with another class.

How to make an AJAX call in JavaScript?

Posted: 2021-12-03 05:37:12
Source: https://linuxhint.com/make-ajax-call-javascript/

AJAX stands for asynchronous JavaScript and XML where XML is used to encrypt messages that are made in readable format for humans and machines except that XML. In JavaScript, the XMLHttpRequest object is used to make an AJAX call. This post elaborates what AJAX is and then discusses how to make an AJAX call in javaScript using the XMLHttpRequest object.

How to make a Discord Bot with JavaScript

Posted: 2021-12-03 05:34:43
Source: https://linuxhint.com/make-discord-bot-javascript/

To make a discord bot using JavaScript first register your bot and then install your bot to the server. After that, go for the installation of the bot server in the IDE that was visual studio code and then went on to code a simple test bot that showed who logged in. After that, create a discord bot that replies with a message whenever the server gets Hello discordbot! Message.

Iterate Array Items using .map() method in JavaScript

Posted: 2021-12-03 05:27:22
Source: https://linuxhint.com/iterate-array-items-using-map-method/

To iterate over an array the most famous iteration technique is the map() method. The map() method is used to iterate over each array’s element and returns a new array that has the length exactly equal to the original array. This post explains how to iterate through an array using the map() method in JavaScript along with two examples.

How to install pgAdmin4 on Manjaro Linux

Posted: 2021-12-03 05:21:11
Source: https://linuxhint.com/install-pgadmin4-manjaro-linux/

The pgAdmin4 is a client for PostgreSQL databases whereas PostgreSQL is an advanced Object-Relational database management system. The pgAdmin4 eases the management of PostgreSQL by providing a visual interface. The notable use of the pgAdmin4 tool is to execute queries, read results, update data, and create databases. This article is a thorough guide on how to install and use pgAdmin on Manjaro Linux. Methods to create a virtual environment for pgAdmin4, creating databases and then tables are also mentioned in this tutorial.

How to install Google Drive on Manjaro

Posted: 2021-12-03 05:17:06
Source: https://linuxhint.com/install-google-drive-manjaro/

Google Drive can be accessed on Manjaro using Gnome Accounts or Insync. It is a cloud storage platform that allows the users to manage their data on cloud. It is a matter of concern that Google has not yet issued the official release for Linux based systems. However, there are several clients that can be obtained on Linux to use Google Drive's services. This article is comprehensive guide on how to get Google Drive on Manjaro Linux.

How to install MySQL Workbench on Manjaro Linux

Posted: 2021-12-03 05:00:24
Source: https://linuxhint.com/install-mysql-workbench-manjaro-linux/

MySQL Workbench is a multipurpose database management tool that integrates several SQL artifacts. It has a set of features to offer such as, SQL development, data modelling, user administration, server configuration, database administration and many more. This article is a thorough guide on how to install and use MySQL Workbench on Manjaro Linux. Different methods of MySQL Workbench installation are provided along with a detailed procedure to use MySQL workbench is also discussed in this guide.

How to fix SSH connection refused error in Manjaro Linux

Posted: 2021-12-03 04:48:45
Source: https://linuxhint.com/fix-ssh-connection-refused-error-manjaro/

SSH (Secure Shell or Secure Socket Shell) allows you to connect to a computer or a server. The connection using SSH is quite tricky therefore it requires intense attention. And if you have not covered all the aspects of making a connection, you may encounter connection refused error while connecting computers using SSH. This article explains what SSH connection refused error is and how to fix it. Four possible solutions are mentioned in this guide to fix connection refused error.

How to create an HTML element through JavaScript using createElement()

Posted: 2021-12-03 04:40:40
Source: https://linuxhint.com/create-html-element-through-javascript/

The createElement() method is used to create an HTML element dynamically by taking the HTML tag name as its parameter and then returning the newly created HTML element. To attach the newly created HTML element to HTML we use the appendChild() or insertBefore() methods. The document object gives us access to HTML elements and one of the built-in methods of the document objects is the createElement() method.

1 ... 562 563 564 565 ... 726