1.Introduction to JavaScript
2.Getting Started with JavaScript
3.JavaScript Fundamentals
4.Object-Oriented Programming
5.Functions and Variable Scope
6.Utilizing JavaScript Operators
7.Events in JavaScript

1.Introduction to JavaScript
2.Getting Started with JavaScript
3.JavaScript Fundamentals

4.Object-Oriented Programming

ถ้าเป็น .NET(C# or VB.NET) , C++ , Java จะคุ้นกับ OO
– object เป็น programming abstraction – group data ที่ code operate ด้วย
– Object encapsulated ทำให้ related data – function -> รวมเป็น single cohesive unit
-Procedure programming eg Cobol , C, Basic
* code และ data แยกจากกัน
* ใน C , unit of code เรียกว่า function , แต่ unit of data เรียกว่า structure , ซึ่งทั้งสองอย่างนี้ ไม่ formally connnect
* C function สามารถ operate บน numerous data structure
และมากกว่า 1 function ก็สามารถ operate บน same structure
-แต่ถ้า OO ทั้ง code – data จะ merge กัน รวมไปเป็น object
– Object เป็น simple data , และ function ก็สามารถทำงานบน data ใน single package
– Object typcially แล้วจะมีทั้ง 2 properties คือ represent by variable
และ method ซึ่งก็คือ function <- ถือว่าเป็นส่วนสำคัญของ object

Properties
p 73


5.Functions and Variable Scope

Variable Scope and Storage Class
variable -คือ segment of memory ที่ hold data
– name ของ variable ที่เรา assign ให้
All javascript variables มี 2 attributes
– Scope
– Storage Class

Variable Scope

p 78

6.Utilizing JavaScript Operators

7.Events in JavaScript