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
TypeScript勉強記_Week1
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ko-chan
October 02, 2023
0
420
TypeScript勉強記_Week1
・基本の書き方
let と var (variable) の違い
アロー関数
ko-chan
October 02, 2023
Tweet
Share
More Decks by ko-chan
See All by ko-chan
TypeScript勉強記_Week5
kochan648
0
150
TypeScript勉強記_Week4
kochan648
0
210
TypeScript勉強記_Week3
kochan648
0
290
TypeScript勉強記_Week2
kochan648
0
390
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
Code Review Best Practice
trishagee
74
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
680
How to Ace a Technical Interview
jacobian
281
24k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Building AI with AI
inesmontani
PRO
1
680
BBQ
matthewcrist
89
10k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Transcript
文系出身プログラミング未経験人の TypeScript 勉強記 ~Week 1~
第1章 書き方 - let : 変数を定義・値の変更可 let L = 1;
L = 3; // 再代入ができる let R; //初期値なしだとundefined R = 1; //後から代入できる - const (constant) : 定数を定義・値の変更不可
let と var (variable) の違い - let : ブロックスコープ 更新
可/再宣言 不可 (constも) - var : グローバルスコープ orローカルスコープ 再宣言・更新 可
let と var (variable) の違い - 今後は ‘ var ‘
は何度も関数を再宣言でコードが見にくくなるため、 ‘ let ‘ , ‘ const ‘ を使い、キレイなコードを作成しよう! - 関数を後から動的に変更することは実務ではあまりない! 通常はconstで関数を宣言しよう!
アロー関数 【前提】関数宣言と関数式の違い - 関数宣言:function文を用いて関数を宣言
アロー関数 - 関数式:変数/定数に関数を値として代入し、後から変数を呼び出すこ とで間接的に関数を利用 let(変数宣言命令)
アロー関数 function(関数)を省略して関数式(関数リテラル)を短く書くことができ る構文
アロー関数の省略形 引数が一つだけの場合 ※引数がない場合 関数内の式が一つだけの場合 戻り値がオブジェクトリテラルの場合
アロー関数の型注釈 代入する値を指定 戻り値も指定可能 型注釈(type annotation): 変数宣言をする際に、変数にどんな値が代入可能かを指定すること ※引数のカッコを省略した場合は、引数と戻り値 の型注釈ができない