<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JaffnaCampus.com &#187; Javascript Object</title>
	<atom:link href="http://jaffnacampus.com/category/javascript/javascript-object/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaffnacampus.com</link>
	<description>Gateway to your IT potential</description>
	<lastBuildDate>Tue, 27 Sep 2011 13:57:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JavaScript RegExp Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-regexp-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-regexp-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:38:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript RegExp Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=265</guid>
		<description><![CDATA[RegExp, is short for regular expression.

What is RegExp?
A regular expression is an object that describes a pattern of   [...]]]></description>
			<content:encoded><![CDATA[<p>RegExp, is short for regular expression.</p>
<hr />
<h2>What is RegExp?</h2>
<p>A regular expression is an object that describes a pattern of   characters.</p>
<p>When you search in a text, you can use a pattern to describe what you   are searching for.</p>
<p>A simple pattern can be one single character.</p>
<p>A more complicated pattern can consist of more characters, and can be   used for parsing, format checking, substitution and more.</p>
<p>Regular expressions are used to perform powerful pattern-matching and   &quot;search-and-replace&quot; functions on text.</p>
<h2>Syntax</h2>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var txt=new RegExp(pattern,modifiers);</p>
<p>        or more simply:</p>
<p>        var txt=/pattern/modifiers; </td>
</tr>
</tbody>
</table>
<ul>
<li>pattern specifies the pattern of an expression</li>
<li>modifiers specify if a search should be global, case-sensitive,   etc.</li>
</ul>
<hr />
<h2>RegExp Modifiers</h2>
<p>Modifiers are used to perform case-insensitive and global searches.</p>
<p>The i modifier is used to perform case-insensitive matching.</p>
<p>The g modifier is used to perform a global match (find all matches   rather than stopping after the first match).</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<h2>Example 1</h2>
<p>Do a case-insensitive search for &quot;w3schools&quot; in a string:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var str=&quot;Visit W3Schools&quot;;<br />
                var patt1=/w3schools/i; </td>
</tr>
</tbody>
</table>
<p>The marked text below shows where the   expression gets a match:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> Visit W3Schools </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<h2>Example 2</h2>
<p>Do a global search for &quot;is&quot;:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var str=&quot;Is this all there is?&quot;;<br />
                var patt1=/is/g;</td>
</tr>
</tbody>
</table>
<p>The marked text below shows where the   expression gets a match:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> Is this all there is? </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<h2>Example 3</h2>
<p>Do a global, case-insensitive search for &quot;is&quot;:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var str=&quot;Is this all there is?&quot;;<br />
                var patt1=/is/gi;</td>
</tr>
</tbody>
</table>
<p>The marked text below shows where the   expression gets a match:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> Is this all   there is? </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>test()</h2>
<p>The test() method searches a string for a specified value, and   returns true   or false, depending on the result.</p>
<p>The following example searches a string for the character &quot;e&quot;:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<h2>Example</h2>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var patt1=new RegExp(&quot;e&quot;);<br />
                document.write(patt1.test(&quot;The best things   in life are free&quot;));</td>
</tr>
</tbody>
</table>
<p>Since there is an &quot;e&quot; in the string, the output of the code above   will be:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> true </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>exec()</h2>
<p>The exec() method searches a string for a specified value, and   returns the text of the found value. If no match is found, it returns <em>null.</em></p>
<p>The following example searches a string for the character &quot;e&quot;:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<h2>Example 1</h2>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var patt1=new RegExp(&quot;e&quot;);<br />
                document.write(patt1.exec(&quot;The best things   in life are free&quot;));</td>
</tr>
</tbody>
</table>
<p>Since there is an &quot;e&quot; in the string, the output of the code above   will be:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>e</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-regexp-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Math Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-math-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-math-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:37:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript Math Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=263</guid>
		<description><![CDATA[The Math object allows you to perform mathematical   tasks.

Math Object
The Math object allows you to perform mathematical tasks.
The [...]]]></description>
			<content:encoded><![CDATA[<p>The Math object allows you to perform mathematical   tasks.</p>
<hr />
<h2>Math Object</h2>
<p>The Math object allows you to perform mathematical tasks.</p>
<p>The Math object includes several mathematical constants and methods.</p>
<p><strong>Syntax for using properties/methods of Math:</strong></p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var pi_value=Math.PI;<br />
        var sqrt_value=Math.sqrt(16);</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> Math is not a constructor. All properties and methods of   Math can be called by using Math as an object without creating it.</p>
<hr />
<h2>Mathematical Constants</h2>
<p>JavaScript provides eight mathematical constants that can be accessed   from the Math object. These are: E, PI, square root of 2, square root   of 1/2, natural log of 2, natural log of 10, base-2 log of E, and   base-10 log of E.</p>
<p>You may reference these constants from your JavaScript like this:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> Math.E<br />
        Math.PI<br />
        Math.SQRT2<br />
        Math.SQRT1_2<br />
        Math.LN2<br />
        Math.LN10<br />
        Math.LOG2E<br />
        Math.LOG10E</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>Mathematical Methods</h2>
<p>In addition to the mathematical constants that can be accessed from   the Math object there are also several methods available.</p>
<p>The following example uses the round() method of the Math object to   round a number to the nearest integer:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(Math.round(4.7));</td>
</tr>
</tbody>
</table>
<p>The code above will result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>5</td>
</tr>
</tbody>
</table>
<p>The following example uses the random() method of the Math object to   return a random number between 0 and 1:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(Math.random());</td>
</tr>
</tbody>
</table>
<p>The code above can result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(Math.random())0.9673354658127411</td>
</tr>
</tbody>
</table>
<p>The following example uses the floor() and random() methods of the   Math object to return a random number between 0 and 10:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(Math.floor(Math.random()*11));</td>
</tr>
</tbody>
</table>
<p>The code above can result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> document.write(Math.floor(Math.random()*11))6</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-math-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Boolean Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-boolean-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-boolean-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:35:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript Boolean Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=261</guid>
		<description><![CDATA[The Boolean object is used to convert a non-Boolean   value to a Boolean value (true or false).

Create a [...]]]></description>
			<content:encoded><![CDATA[<p>The Boolean object is used to convert a non-Boolean   value to a Boolean value (true or false).</p>
<hr />
<h2>Create a Boolean Object</h2>
<p>The Boolean object represents two values: &quot;true&quot; or &quot;false&quot;.</p>
<p>The following code creates a Boolean object called myBoolean:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>var myBoolean=new Boolean();</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> If the Boolean object has no initial value or if it is   0, -0, null, &quot;&quot;, false, undefined,   or NaN, the object is set to false. Otherwise it is true (even with the   string &quot;false&quot;)!</p>
<p>All the following lines of code create Boolean objects with an   initial value of false:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var myBoolean=new Boolean();<br />
        var myBoolean=new Boolean(0);<br />
        var myBoolean=new Boolean(null);<br />
        var myBoolean=new Boolean(&quot;&quot;);<br />
        var myBoolean=new Boolean(false);<br />
        var myBoolean=new Boolean(NaN);</td>
</tr>
</tbody>
</table>
<p>And all the following lines of code create Boolean objects with an   initial value of true:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var myBoolean=new Boolean(true);<br />
        var myBoolean=new Boolean(&quot;true&quot;);<br />
        var myBoolean=new Boolean(&quot;false&quot;);<br />
        var myBoolean=new Boolean(&quot;Richard&quot;);</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-boolean-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Array Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-array-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-array-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:33:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript Array Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=259</guid>
		<description><![CDATA[The Array object is used to store multiple values in a   single variable.

What is an Array?
An array is [...]]]></description>
			<content:encoded><![CDATA[<p>The Array object is used to store multiple values in a   single variable.</p>
<hr />
<h2>What is an Array?</h2>
<p>An array is a special variable, which can hold more than one value,   at a   time.</p>
<p>If you have a list of items (a list of car names, for example),   storing the   cars   in single variables could look like this:</p>
<table id="table1" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> cars1=&quot;Saab&quot;;<br />
        cars2=&quot;Volvo&quot;;<br />
        cars3=&quot;BMW&quot;; </td>
</tr>
</tbody>
</table>
<p>However, what if you want to loop through the cars and find a   specific one?   And what if you had not 3 cars, but 300?</p>
<p>The best solution here is to use an array!</p>
<p>An array can hold all your variable values under a single name. And   you can   access the values by referring to the array name.</p>
<p>Each element in the array has its own ID so that it can be easily   accessed.</p>
<hr />
<h2>Create an Array</h2>
<p>An array can be defined in three ways. </p>
<p>The following code creates an Array object called myCars:</p>
<p>1: </p>
<table id="table3" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>var myCars=new Array(); // regular array (add an optional   integer<br />
        myCars[0]=&quot;Saab&quot;;       // argument to control array&#8217;s size)<br />
        myCars[1]=&quot;Volvo&quot;;<br />
        myCars[2]=&quot;BMW&quot;;</td>
</tr>
</tbody>
</table>
<p>2:</p>
<table id="table4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>var myCars=new Array(&quot;Saab&quot;,&quot;Volvo&quot;,&quot;BMW&quot;);   	// condensed array</td>
</tr>
</tbody>
</table>
<p>3:</p>
<table id="table5" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>var myCars=[&quot;Saab&quot;,&quot;Volvo&quot;,&quot;BMW&quot;]; // literal array</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> If you specify numbers or true/false values inside the   array then the variable   type will be Number or Boolean, instead of String.</p>
<hr />
<h2>Access an Array</h2>
<p>You can refer to a particular element in an array by referring to the   name of the array and the index number. The index number starts at 0.</p>
<p>The following code line:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(myCars[0]);</td>
</tr>
</tbody>
</table>
<p>will result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>Saab</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>Modify Values in an Array</h2>
<p>To modify a value in an existing array, just add a new value to the   array with a specified index number:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>myCars[0]=&quot;Opel&quot;;</td>
</tr>
</tbody>
</table>
<p>Now, the following code line:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>document.write(myCars[0]);</td>
</tr>
</tbody>
</table>
<p>will result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>Opel</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-array-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Date Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-date-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-date-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:31:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript Date Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=257</guid>
		<description><![CDATA[The Date object is used to work with dates and times.

Create a Date Object
The Date object is used to work [...]]]></description>
			<content:encoded><![CDATA[<p>The Date object is used to work with dates and times.</p>
<hr />
<h2>Create a Date Object</h2>
<p>The Date object is used to work with dates and times. </p>
<p>Date objects are created with the Date() constructor.</p>
<p>There are four ways of instantiating a date:</p>
<table id="table1" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> new Date() // current date and time<br />
        new Date(milliseconds) //milliseconds since 1970/01/01<br />
        new Date(dateString)<br />
        new Date(year, month, day, hours, minutes, seconds, milliseconds)</td>
</tr>
</tbody>
</table>
<p>Most parameters above are optional. Not specifying, causes 0 to be   passed in.</p>
<p>Once a Date object is created, a number of methods allow you to   operate on   it. Most methods allow you to get and set the year, month, day, hour,   minute, second, and milliseconds of the object, using either local time   or UTC   (universal, or GMT) time.</p>
<p>All dates are calculated in milliseconds from 01 January, 1970   00:00:00   Universal Time (UTC) with a day containing 86,400,000 milliseconds.</p>
<p>Some examples of instantiating a date:</p>
<table id="table2" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> today = new Date()<br />
        d1 = new Date(&quot;October 13, 1975 11:13:00&quot;)<br />
        d2 = new Date(79,5,24)<br />
        d3 = new Date(79,5,24,11,33,0)</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>Set Dates</h2>
<p>We can easily manipulate the date by using the methods available for   the Date object.</p>
<p>In the example below we set a Date object to a specific date (14th   January 2010):</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var myDate=new Date();<br />
        myDate.setFullYear(2010,0,14);</td>
</tr>
</tbody>
</table>
<p>And in the following example we set a Date object to be 5 days into   the future:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var myDate=new Date();<br />
        myDate.setDate(myDate.getDate()+5);</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> If adding five days to a date shifts the month or year,   the changes are handled automatically by the Date object itself!</p>
<hr />
<h2>Compare Two Dates</h2>
<p>The Date object is also used to compare two dates.</p>
<p>The following example compares today&#8217;s date with the 14th January   2010:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var myDate=new Date();<br />
        myDate.setFullYear(2010,0,14);<br />
        var today = new Date();</p>
<p>        if (myDate&gt;today)<br />
        {<br />
        alert(&quot;Today is before 14th January 2010&quot;);<br />
        }<br />
        else<br />
        {<br />
        alert(&quot;Today is after 14th January 2010&quot;);<br />
        }</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-date-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript String Object</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-string-object/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-string-object/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:30:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript String Object]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=255</guid>
		<description><![CDATA[The String object is used to manipulate a stored piece   of text.

String object
The String object is used to [...]]]></description>
			<content:encoded><![CDATA[<p>The String object is used to manipulate a stored piece   of text.</p>
<hr />
<h2>String object</h2>
<p>The String object is used to manipulate a stored piece of text.</p>
<p><strong>Examples of use:</strong></p>
<p>The following example uses the length property of the String object   to find the length of a string:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var txt=&quot;Hello world!&quot;;<br />
        document.write(txt.length);</td>
</tr>
</tbody>
</table>
<p>The code above will result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>12</td>
</tr>
</tbody>
</table>
<p>The following example uses the toUpperCase() method of the String   object to convert a string to uppercase letters:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td> var txt=&quot;Hello world!&quot;;<br />
        document.write(txt.toUpperCase());</td>
</tr>
</tbody>
</table>
<p>The code above will result in the following output:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>HELLO WORLD!</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-string-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Objects Introduction</title>
		<link>http://jaffnacampus.com/javascript/javascript-object/javascript-objects-introduction/</link>
		<comments>http://jaffnacampus.com/javascript/javascript-object/javascript-objects-introduction/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:28:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript Object]]></category>
		<category><![CDATA[JavaScript Objects]]></category>

		<guid isPermaLink="false">http://jaffnacampus.com/?p=253</guid>
		<description><![CDATA[JavaScript is an Object Oriented Programming (OOP)   language.
An OOP language allows you to define your own objects  [...]]]></description>
			<content:encoded><![CDATA[<p>JavaScript is an Object Oriented Programming (OOP)   language.</p>
<p>An OOP language allows you to define your own objects   and make your own variable types.</p>
<hr />
<h2>Object Oriented Programming</h2>
<p>JavaScript is an Object Oriented Programming (OOP) language. An OOP   language allows you to define your own objects and make your own   variable types.</p>
<p>However, creating your own objects will be explained later, in the   Advanced JavaScript section. We will start by looking at the built-in   JavaScript objects, and how they are used. The next pages will explain   each built-in JavaScript object in detail.</p>
<p>Note that an object is just a special kind of data. An object has   properties and methods.</p>
<hr />
<h2>Properties</h2>
<p>Properties are the values associated with an object.</p>
<p>In the following example we are using the length property of the   String object to return the number of characters in a string:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>&lt;script type=&quot;text/javascript&quot;&gt;<br />
        var txt=&quot;Hello World!&quot;;<br />
        document.write(txt.length);<br />
        &lt;/script&gt;</td>
</tr>
</tbody>
</table>
<p>The output of the code above will be:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>12</td>
</tr>
</tbody>
</table>
<p></p>
<hr />
<h2>Methods</h2>
<p>Methods are the actions that can be performed on objects.</p>
<p>In the following example we are using the toUpperCase() method of the   String object to display a text in uppercase letters:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>&lt;script type=&quot;text/javascript&quot;&gt;<br />
        var str=&quot;Hello world!&quot;;<br />
        document.write(str.toUpperCase());<br />
        &lt;/script&gt;</td>
</tr>
</tbody>
</table>
<p>The output of the code above will be:</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>HELLO WORLD!</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jaffnacampus.com/javascript/javascript-object/javascript-objects-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

