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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ygkn
June 20, 2019
Programming
230
0
Share
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
240
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
tRPCの概要と少しだけパフォーマンス
misoton665
2
230
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
170
エラー処理の温故知新 / history of error handling technic
ryotanakaya
0
140
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
t *testing.T は どこからやってくるの?
otakakot
1
710
Kingdom of the Machine
yui_knk
2
820
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
180
Don't Prompt Harder, Structure Better
kitasuke
0
780
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
170
🦞OpenClaw works with AWS
licux
1
200
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
850
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
6.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Test your architecture with Archunit
thirion
1
2.2k
The Curse of the Amulet
leimatthew05
1
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
220
First, design no harm
axbom
PRO
2
1.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Cult of Friendly URLs
andyhume
79
6.8k
Done Done
chrislema
186
16k
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 のライブラリがあるよ!!!
ありがとうございました!