Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
Transcript
37 slides
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 のライブラリがあるよ!!!
ありがとうございました!
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
260
入門 React Hooks / Introduction of React Hooks
ygkn
0
230
Other Decks in Programming
See All in Programming
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
160
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
140
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
580
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
240
はじめてのKubernetesコントリビューション
nasa9084
0
330
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.4k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
480
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
350
SODA - FACT BOOK(JP)
sodainc
1
40k
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
1.4k
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
270
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
Git: the NoSQL Database
bkeepers
PRO
433
67k
RailsConf 2023
tenderlove
30
1.6k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Facilitating Awesome Meetings
lara
57
7.2k
30 Presentation Tips
portentint
PRO
1
480
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
310
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
830
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Testing 201, or: Great Expectations
jmmastey
46
8.4k