Javascript
JS intro
JS basics
JS variables
JS functions
JS popup boxes
JS conditional logic
JS loops
JS arrays
JS objects
JS strings
JS events
JS errors
JS DOM
JS elements
JS new windows
JS date and time
JS cookies
JS print
JS redirect
JS void 0
JS Summary

Programming

Programming intro
Java

Markup

First webpage guide
HTML
XHTML

Style & Layout

CSS

Browser scripting

VBScript
AJAX

Server scripting

PHP
ASP

Making money online

Make money online

Javascript String object

A String is a grouping of characters sorrounded by double quotes such as "this is a string". The String object is used to work with such entitites.

This lesson focuses on:

Instantiating a String object

A String object is instantiated using the new keyword.

Example:

var aString = new String("Here is some text");

Alternatively, a String object can be instantiated by sorrounding text in double quotes and assigning it to a variable.

var anotherString = "Here is some more text";

Properties of the String object

Methods of the String object

Practice

Online code editor
Practical examples
Practical exercises
Step-by-step tutorials

Reference

Terms glossary
Reference material

Rate this site

Rate this site
Visitor comments