How to Use the typeof operator in JavaScript
The typeof operator accepts an operand and returns the type of the provided operand as a string. The following sample code shows the typeof operator in
Your home for helpful JavaScript how-to guides
The typeof operator accepts an operand and returns the type of the provided operand as a string. The following sample code shows the typeof operator in
JavaScript’s toString() method receives an argument, returning the object’s text representation as a string. The string value returned depends on the type of the argument that
JavaScript’s toLowerCase() method takes a string and converts it into a new string consisting of only lowercase letters. Remember: JavaScript strings are immutable. This method will
The replace() method operates on a String, returning a new string with the corresponding changes. Note: JavaScript strings are immutable. Syntax The syntax of the replace()
The split() method takes a string and returns an array of strings, splitting the original string based upon a provided separator character. This can be useful
The slice() method is a part of both the Array and String prototypes, and can be used with either type of object. The method returns items
In JavaScript, an Object is a special kind of data type. This article provides an introduction to one of JavaScript’s most important data types. One that
The indexOf() method is a part of the Array prototype and the String prototype, and therefore it applies to objects of both types. The method returns
Functions are an essential component of any programming language, and JavaScript is no exception. Functions spark life into the code, making it more dynamic. A function
The filter() method filters an array according to provided criteria, returning a new array containing the filtered items. The Array object’s filter() method is an iteration
Values in JavaScript each have a data type. JavaScript has multiple different data types, and each type has a different set of properties and methods. These
The Array object’s reduce method is an iteration method which, similar to other iteration methods (map(), forEach(), filter() etc.) helps us work through all of the