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
ygkn
June 20, 2019
Programming
270
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
250
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
160
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
250
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
370
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.9k
Jetpack Compose メカニズム
skydoves
0
460
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
Security issues being discussed on Web Platforms
petamoriken
0
1k
Heart of Swift Concurrency
koher
0
940
setup-vp GitLab対応の裏側
naokihaba
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
260
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
380
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Building Adaptive Systems
keathley
44
3.2k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
680
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Building an army of robots
kneath
307
46k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Optimising Largest Contentful Paint
csswizardry
37
4k
My Coaching Mixtape
mlcsv
0
320
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 のライブラリがあるよ!!!
ありがとうございました!