Code to Use in JavaScript Variable Manipulation Functions
As shown in the following table, you can use these JavaScript statements in your own code to create and modify variables in your JavaScript functions.
| Element | Description |
| var myVar = 0; |
Creates a variable with given starting value. Type is determined dynamically. |
| stringVar = prompt("message") |
Sends message to user in a dialog box, retrieves text input from user and stores it in stringVar. |
| stringVar.length |
Returns the length (in characters) of stringVar. |
| stringVar.toUpperCase(), stringVar.toLowerCase() |
Converts stringVar to upper- or lowercase. |
| stringVar.substring() |
Returns a specified subset of stringVar. |
| stringVar.indexOf() |
Returns location of a substring in stringVar (or -1). |
| parseInt() |
Converts string to int. |
| parseFloat() |
Converts string to float. |
| toString() |
Converts any variable to string. |
| eval() |
Evaluates string as JavaScript code. |
| Math.ceil() |
Converts any number to integer by rounding up. |
| Math.floor() |
Converts any number to integer by rounding down. |
| Math.round() |
Converts any number to integer by standard rounding algorithm. |
| Math.random() |
Returns random float between 0 and 1. |

Web Design & Development Glossary
AJAX
asynchronous JavaScript and XML. A technique used in web page development.

Web Design & Development Glossary
API
application programming interface. A set of rules programs use to communicate with each other.

Web Design & Development Glossary
color stop
A special element that indicates a color to be added to a gradient.

Web Design & Development Glossary
FTP
File Transfer Protocol. A network protocol useful for transferring files in a client-server relationship.

Web Design & Development Glossary
HTML
HyperText Markup Language. The predominant language for building web pages.

Web Design & Development Glossary
HTTP
HyperText Transfer Protocol. The primary networking language for the Internet.

Web Design & Development Glossary
PHP
PHP Hypertext Processor. A scripting language that works well within HTML.

Web Design & Development Glossary
socket
A technology that allows remote computers to maintain a persistent connection in order to communicate with each other.

Web Design & Development Glossary
sprite
An graphic object on a web page that will be manipulated in real time.

Web Design & Development Glossary
SQL
Structured Query Language. A programming language useful in managing relational databases.

Web Design & Development Glossary
stateless protocol
An Internet procedure that completely breaks the connection between the client and the server after a transaction, meaning that the next transaction will require an entirely new connection.

Web Design & Development Glossary
Telnet
A network protocol useful in interactive, text-oriented communications.

Web Design & Development Glossary
W3C
World Wide Web Consortium. The organization that sets international standards for the World Wide Web.