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
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
CSC307 Lecture 04
javiergs
PRO
0
660
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
CSC307 Lecture 02
javiergs
PRO
1
780
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
AtCoder Conference 2025
shindannin
0
1.1k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AgentCoreとHuman in the Loop
har1101
5
240
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
A Soul's Torment
seathinner
5
2.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
How to Talk to Developers About Accessibility
jct
2
130
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
My Coaching Mixtape
mlcsv
0
48
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
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 のライブラリがあるよ!!!
ありがとうございました!