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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
360
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
220
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
110
仕様駆動開発の消費期限
watany
20
9.2k
Press start. Python's next generation.
willingc
PRO
3
290
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
640
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.1k
リアルな遅延を測る仕様
kota_yata
1
130
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
業務時間外もAIに働いてもらう話
colorful12
3
9.5k
バグを直したら useEffect が消えた
colorful12
3
780
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.5k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
How GitHub (no longer) Works
holman
316
150k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Evolving SEO for Evolving Search Engines
ryanjones
0
270
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Leo the Paperboy
mayatellez
8
2.2k
Side Projects
sachag
455
43k
Claude Code のすすめ
schroneko
67
230k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
For a Future-Friendly Web
brad_frost
183
10k
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 のライブラリがあるよ!!!
ありがとうございました!