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のテンプレートリテラル / Template Literal of Jav...
Search
ygkn
June 20, 2019
Programming
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
250
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
2
880
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
120
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
190
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
270
T3DD26: From RAGs to Riches
martinhelmich
0
130
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
270
Dockerfile CMD for Node.js
grazie1999
0
160
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
680
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.4k
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.3k
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
640
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
230
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
680
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
710
AI: The stuff that nobody shows you
jnunemaker
PRO
9
960
ラッコキーワード サービス紹介資料
rakko
1
4.6M
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
The untapped power of vector embeddings
frankvandijk
2
1.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
810
Transcript
JavaScript の テンプレートリテラル やぎちゃん
自己紹介
文字をくっつけよう!
文字をくっつけよう!
もじぴったん
None
+演算子のなところ 加算?結合?
+演算子のなところ 加算?結合?
+演算子のなところ 加算?結合?
文字列の結合?
テンプレートリテラルで書く
さっきの
テンプレートリテラルで書く
テンプレートリテラルで書く
One more thing...
None
None
None
None
None
とはならない!
None
これ is 何?
None
これ is 何? タグ付きテンプレート文字列 →テンプレートリテラルで書かれた文字列(の配列)と埋め込まれた変数を受け取る関 数
タグ付きテンプレート文字列の例 (from MDN)
None
None
None
タグ付きテンプレート文字列と @emotion/styled (styled-componentsも可)
Styled Components?
Styled Components?
Styled Components? 一種のHOC
Styled Components?
Styled Components?
まとめ!!! • テンプレートリテラルは文字の連結だけじゃないよ! • 文字列と埋め込む変数を別々に関数に渡すのでいろいろできるよ!! • ↑の例として SQL や CSS
in JS のライブラリがあるよ!!!
ありがとうございました!