3D Gallery with Great Artwork Imagine Logo with Three Colors Beach Cabin 3D Android Tablet with Different Screens Studio Apartment Red Figured Greek Vase on Blue Background Silver and Gold Flashlight Lake on Fire

JavaScript: Strings & Arrays

Page 18

Strings & Arrays

Introduction String Methods Array Methods Summary

Introduction

This page is under development.

Learn to use basic JavaScript string and array methods such as slice(), substring(), substr(), join(), push(), pop(), trim(), find(), findIndex() and many more.

String Methods

Let's try str.slice(index1, index2), str.slice(-index1, -index2) and str.slice(-index1), str.slice(index1). str.substring(index1,index2) can't accept negative parameters. str.substr(index1,index2) where the second parameter specifies the string length. str.padStart(i1), str.padEnd(i1), trim() and other string padding techniques.

Array Methods

Array methods include join(), pop(), push(), shift(), unshift(), splice(), slice(), concat(), sort(), reverse(), sort:Math.max(), sort:Math.min(), isArray(), includes() and array iteration methods.

Also learn some JavaScript array techniques.

const aCats = ["Burmese","Russian Blue","Lynx"];

Array Length

Use the length property to obtain the number of elements in an array. You can also use length to append an array. The following example appends array cats.

cats[cats.length] = "Croatian Wild Cat";

Summary

This page is under development.

You learned to use basic JavaScript string and array methods such as slice, substring(), substr(), join(), push(), pop() and many more.

Learn JavaScript

JavaScript's the foundation of Web developer and Website design skills. This free and unique JavaScript tutorial includes some new or seldom used, but useful features.

Tags
canvas drawing, web design, web designing course, how to become a web developer, coding websites, website developers,learning web design, html web design, html5 canvas tutorials, coding Website, html5 canvas, learn to code, html5 canvas tutorial,learn html tutorial, simple html tutorial

Ads >
Create 3D Games: Learn WebGL Book 2 Simple Shaders: Learn WebGL Book 4
3D Programming for Beginners: Learn WebGL Book 1

for Web graphics!

Copyright © 2022 Amy Butler. All Rights Reserved.