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
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
230
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
320
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.8k
act1-costs.pdf
sumedhbala
0
120
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.5k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.5k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
750
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
13
6.3k
Datadog LLM Observabilityで実現する 安全なLLM Usage 管理
3150
0
110
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
How to Ace a Technical Interview
jacobian
281
24k
Chasing Engaging Ingredients in Design
codingconduct
0
230
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
HDC tutorial
michielstock
2
720
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
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 のライブラリがあるよ!!!
ありがとうございました!