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
0
220
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
Tweet
Share
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
230
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
Fluid Templating in TYPO3 14
s2b
0
130
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
290
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
230k
How to Ace a Technical Interview
jacobian
281
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
First, design no harm
axbom
PRO
2
1.1k
Leo the Paperboy
mayatellez
4
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
93
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Everyday Curiosity
cassininazir
0
130
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Site-Speed That Sticks
csswizardry
13
1.1k
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 のライブラリがあるよ!!!
ありがとうございました!