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
250
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
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
110
Claude Team Plan導入・ガイド
tk3fftk
0
210
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.6k
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
どこまでゆるくて許されるのか
tk3fftk
0
510
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
200
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
160
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
530
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
120
自作OSでスライド発表する
uyuki234
1
3.9k
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
330
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
180
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The SEO identity crisis: Don't let AI make you average
varn
0
520
Accessibility Awareness
sabderemane
1
160
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
How to Talk to Developers About Accessibility
jct
2
410
Exploring anti-patterns in Rails
aemeredith
3
450
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 のライブラリがあるよ!!!
ありがとうございました!