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
290
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
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
290
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
180
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
140
Distance field of Julia set
kinakomoti321
0
330
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
200
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
210
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
250
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
160
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
516
110k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k
The Cult of Friendly URLs
andyhume
79
7.1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Fireside Chat
paigeccino
43
4.1k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
950
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k