How-to articles, tricks, and solutions about DATA TYPES

How to Center a <div> on the Screen Using jQuery

Read the tutorial and learn the jQuery method of centering the <div> element on the screen. Get a code snippet to add your script for centering the element.

How to Change Selected Value of a Drop-Down List Using jQuery

In this tutorial, you will read and learn about jQuery methods that are used to change the selected value of a drop-down list via its text description.

How to Check if a Variable is of Function Type

Read this JavaScript tutorial and learn several fast and useful methods that are invoked for checking whether the variable is of function type or not.

How to Check if an Object has a Specific Property in JavaScript

Read this tutorial and learn the methods of checking whether the specified object has the specified property in JavaScript. Find the fastest one for you.

How to Check if Function Exists in JavaScript

In this tutorial, you will read and learn information about the two methods of checking whether a function exists in JavaScript or it has not been defined.

How to Check if the Variable is Undefined

This tutorial provides the method of checking whether the type of the variable is undefined. Read about the differences between undefined and “undefined”.

How to Check Whether a String Matches a RegEx in JavaScript

Read and learn two methods used to check whether a string matches RegEx in JavaScript. Also, see which method is the fastest and differences between them.

How to Compare Two JavaScrpt Arrays

You can either loop through the arrays or convert them to string and then compare. This tutorial provides several fast methods of comparing two arrays.

How to Convert a Number to a String in JavaScript

Read the tutorial and find several easy and fast approaches to converting a number to a string in JavaScript. Choose the best method for your workflow.

How to Convert String to Title Case with JavaScript

Read this JavaScript tutorial and learn information about the combinations of methods that make it possible to convert the string to title case easily.

How to Count String Occurrence in String

Read this tutorial and learn several useful methods that are used to count the string occurrence in a string. Choose one of the working methods for you.

How to Create a Dialog with JavaScript

Read this JavaScript tutorial and learn information about the method which can create a modal dialog with an optional message and “OK” and “Cancel” buttons.

How to Display a JavaScript Object

Sometimes it is necessary to display a JavaScript object. With the help of the given tutorial, you will find the best solutions to displaying an object.

How to Find out the Caller Function in JavaScript

Read this JavaScript tutorial and learn the accepted method of finding out the call stack. Get information about the obsolete method of getting the call.

How to Generate One-Time Password in PHP

On this page, we cover a common issue that almost all the developers come across: generating one time password with PHP that can be reliable and helpful.

How to Generate Static Classes in PHP

This snippet will assist you in working with classes in PHP. Learn how to generate static classes with the help of our guidelines.

How to Get a Class Name of an Object

Read this tutorial and learn information about several methods that are used for getting the class name of the object in JavaScript. Also, try examples.

How to Get the Client Timezone Offset in JavaScript

Read this tutorial and learn several useful methods that are used to detect the client timezone offset in JavaScript easily. Choose the best one for you.

How to Get the data-id Attribute

Read this tutorial and learn the right ways of getting the data-id attribute using jQuery two methods. Also, learn more information about the two methods.

How to Get the First Character of a String

Read this JavaScript tutorial and learn several string methods that are used to retrieve the first character of a string. Choose the best one for you.

How to Get the Last Item in an Array

Read the tutorial and learn the methods of getting the last item in the array. Get to know the methods and their peculiarities to find the best solution.

How to Get the Value of a Textarea using jQuery

Read this tutorial and learn useful information about how you can detect the value of the HTML <textarea> element easily using one of the jQuery methods.

How to List the Properties of a JavaScript Object

Read this tutorial and learn useful information about the two popular built-in methods that are used for listing the properties of the object in JavaScript.

How to Move an Array Element from One Array Position to Another

In this JavaScript tutorial, you will read and learn information about an easy insert strategy method of moving the array element to another position.

How to Reload a Page using JavaScript

Read the tutorial and learn information about the method of reloading a page using JavaScript. Also, learn how to make the page be loaded automatically.

1 2