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
45
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
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
210
たのしいparse.y
ydah
3
120
Recoilを剥がしている話
kirik
5
6.7k
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
testcontainers のススメ
sgash708
1
120
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
2
670
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Statistics for Hackers
jakevdp
796
220k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Optimising Largest Contentful Paint
csswizardry
33
3k
Scaling GitHub
holman
458
140k
Practical Orchestrator
shlominoach
186
10k
4 Signs Your Business is Dying
shpigford
181
21k
Into the Great Unknown - MozCon
thekraken
33
1.5k
We Have a Design System, Now What?
morganepeng
51
7.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Making the Leap to Tech Lead
cromwellryan
133
9k
Navigating Team Friction
lara
183
15k
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