Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Javascript_基礎二.pdf
Search
darrenyaoyaoyao
October 27, 2020
Programming
0
110
Javascript_基礎二.pdf
darrenyaoyaoyao
October 27, 2020
Tweet
Share
More Decks by darrenyaoyaoyao
See All by darrenyaoyaoyao
HTML__CSS_基礎二.pdf
darrenyaoyaoyao
0
46
Pug.pdf
darrenyaoyaoyao
0
52
Sass.pdf
darrenyaoyaoyao
0
47
jquery.pdf
darrenyaoyaoyao
1
52
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
42
bootstrap.pdf
darrenyaoyaoyao
1
64
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
78
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
46
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
26
Other Decks in Programming
See All in Programming
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
110
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
160
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
820
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
140
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
Zoneless Testing
rainerhahnekamp
0
120
useSyncExternalStoreを使いまくる
ssssota
6
1.1k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Adopting Sorbet at Scale
ufuk
73
9.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
A Tale of Four Properties
chriscoyier
157
23k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Transcript
Javascript 基礎⼆ 控制網⾴的基礎
今⽇⽬標
for 迴圈 for (var i = 0 ; i <
5 ; i++) { … }
for ( 語法⼀ ; 語法⼆ ; 語法三) { … }
語法⼀ : 初始條件 語法⼆ : 結束條件 語法三 : 每次回圈都要執⾏的程式
for 迴圈其實是程式碼的縮寫 for (var i = 0 ; i <
5 ; i++) { console.log(“Hello”) } console.log(“Hello”) console.log(“Hello”) console.log(“Hello”) console.log(“Hello”) console.log(“Hello”)
function 函式 function () { … return XXX; } 封裝常⽤的程式碼
array 陣列 var a = [“12”, “23”, “4”] a[0] =
“12” a[1] = “23” a[2] = “4”
array 陣列常⽤⼦函式 var a = [“12”, “23”, “4”] a.length //
指 a 的長度 a.push(“56”) // 在尾巴新增內容
object 物件 var david = { age: 12, weight: 70
} david.age = 12 david.weight = 70
object 物件 var david = { age: 12, weight: 70
} david.age = 12 david.weight = 70
object 物件 var david = { age: 12, weight: 70
} 我們會稱 age 為 key 12 為 value
object 物件 var david = { age: 12, weight: 70
} key 可以為任意英⽂字或字串 value 可以為任何型態 包括 function, arrary, object