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
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
A2UI という光を覗いてみる
satohjohn
1
150
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
1
410
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
170
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
300
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
750
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
300
Lessons from Spec-Driven Development
simas
PRO
0
220
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
220
Prompt Engineering for Job Search
mfonobong
0
350
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
Building an army of robots
kneath
306
46k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
170
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
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 のライブラリがあるよ!!!
ありがとうございました!