JavaScript Object
• JavaScript is an Object Oriented Programming (OOP)
language
• A JavaScript object has properties and methods
> Example: String JavaScript object has length property and
toUpperCase() method
<script type="text/javascript">
var txt="Hello World!" document.write(txt.length) document.write(txt.toUpperCase())
</script>
JavaScript Built-in Objects
• String
• Date
• Array
• Boolean
• Math
JavaScript Object vs. Java Object
• Simlarities
> Both has properties and methods
• Differences
> JavaScript object can be dynamically typed while Java object is statically typed
> In JavaScript, properties and methods are dynamically added
SEE VIDEO
SEE VIDEO
0 Responses So Far: