News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Strings in JavaScript Part 1

Started by District_posters, May 22, 2006, 08:56:49 AM

Previous topic - Next topic

0 Members and 21 Guests are viewing this topic.

the_ebez

 Strings in JavaScript Part 1
Formatting text

String manipulation is an important part of JavaScript programming, and having recently been reminded that I have yet to write a tutorial on it, this one comes as long overdue. In Part 1 of "Strings In JavaScript", I'll discuss how to format text using the language, and how this can be useful in real life situations.

The String object

Before we officially proceed, it's important to realize the existence of a String Object in JavaScript, and how it is created- whenever a variable contains text. Take the following as an example:

var sitename="JavaScript Kit"

In the above, "sitename" is not only a variable, but an instance of the String object as well.

CLECK HERE TO READ PART 2 : You are not allowed to view links. Register or Login