The type of a piece of data is important because it determines what kind of data can be stored in it and what operations can be performed on it. For example, you can multiply the number 2 by the number 3 to get the result 6. But if you multiply the character "2" by the character "3", you get nonsense results.
Welcome to Bucaro TecHelp!

Welcome to Bucaro TecHelp!
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact Advertise on Bucaro TecHelp Advertise Here RSS News Feeds News Feeds

HTML5 Solutions: Essential Techniques for HTML5 Developers

Essential Techniques for HTML5 Developers

HTML5 brings the biggest changes to HTML in years. Web designers now have new techniques, from displaying video and audio natively in HTML, to creating realtime graphics on a web page without a plugin.

This book provides a collection of solutions to all of the most common HTML5 problems. Every solution contains sample code that is production-ready and can be applied to any project.

Click Here

Java Script Data Types

Programs work with data. A data type specifies what kind of data, for example a number or a string of characters. The type of a piece of data is important because it determines what kind of data can be stored in it and what operations can be performed on it. For example, you can multiply the number 2 by the number 3 to get the result 6. But if you multiply the character "2" by the character "3", you get nonsense results.

Data types can be broken down into two categories, primitive and composite. Primitive data types, like the integer, are the simplest. Composite data types, like the object, are composed of several primitive data types.

Primitive Data Types

JavaScript supports several primitive data types.

• Integer
• Floating-point number
• String
• Boolean

Integers are whole numbers, either positive or negative. Integers are usually expressed in decimal (base 10) notation, for example 123, but they can also be expressed in hexadecimal or octal notation.

Hexidecimal (base 16) notation is commonly used when referring to data as it's stored in a computers memory. A hexadecimal data type is indicated by starting a number with 0x, for example 0x7aff.

Octal (base 8) notation was used when referring to data as its stored in a 4-bit memory cell and is now obsolete. An Octal data type is indicated by starting a number with 0, for example 0275.

Floating-point numbers are fractional numbers, either positive or negative. Floating-point numbers are usually expressed by including a decimal point, for example 123.45, but when expressing very large or very small numbers, they can be expressed in exponential notation. Numbers expressed in exponential notation include a decimal point along with the letter e, for example 1.234e8.

Strings are a row of one or more characters, for example a word or a paragraph. A string is expressed by enclosing it in quotes, for example "hello". The quotes can be either single or double, but the starting quote must match the ending quote. If you want to use a quote character within your string, enclose the string in the opposite kind of quote, for example 'I said "hello" to you'.

Booleans are logical values that can be expressed as either true or false. Booleans are commonly used when making tests or comparisons. For example, if logged-in equals true, then permit access, if logged-in equals false, block access. During computation true evaluates to 1 and false evaluates to 0.

Web Design Sections

RSS Feed RSS Feed

Google Reader or Homepage
Add to My Yahoo!
Subscribe with Bloglines

Add to My AOL
Add to Technorati Favorites!

Java Script Quick Reference
Java Script Data Types
Java Script Reserved Words
JavaScript Operators
Java Script Arrays
Java Script Character Encoding and Decoding
Comparison Operators
The if/else Structure
The Conditional Operator
The switch/case Structure
The for Loop
The while Loop
The break Statement
The continue Statement
JavaScript Math Object
Java Script Arithmetic Operators
Round a Number
Determine Absolute Value
Determine Minimum and Maximum
Generating Random Numbers
Java Script Trigonometric Methods
Java Script Number Object
Format a Number as Currency
Java Script Strings
Compare Two Strings
Find a Character or a Substring Within a String
Include a Quote Character in a String
Include a Backslash Character in a String
Define Lines in a String
Use Escape to Replace Dangerous Characters
Convert a Number to a String
Convert a String to a Number
The Document Object Model (DOM)
Accessing Web Page Elements
The Location Object
The Screen Object
Access Web Page Elements With getElementById
Interactively Set Webpage Colors
Get Webpage File Date and File Size
Dueling Windows
Cookie Power Made Easy
Web Designer's Reference


[Site User Agreement] [Advertise on This site] [Search This Site] [Contact Form]
Copyright©2001-2011 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268