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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
360
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
220
CSC307 Lecture 10
javiergs
PRO
1
690
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
170
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
CSC307 Lecture 12
javiergs
PRO
0
450
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
3
430
Oxlint JS plugins
kazupon
1
1.1k
Ruby x Terminal
a_matsuda
5
510
CSC307 Lecture 13
javiergs
PRO
0
310
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
160
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
970
Being A Developer After 40
akosma
91
590k
The Invisible Side of Design
smashingmag
302
51k
Deep Space Network (abreviated)
tonyrice
0
81
Scaling GitHub
holman
464
140k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
170
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Mobile First: as difficult as doing things right
swwweet
225
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 のライブラリがあるよ!!!
ありがとうございました!