Skip to content

Commit fe9eb64

Browse files
authored
add javascript template literals
1 parent 9197ce6 commit fe9eb64

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Javascript/template-literals.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// JavaScript Template Literals
2+
3+
// Template Literals are enclosed with backticks ``
4+
// Allow variables and expression, use single and dual quotes, multiline in strings
5+
const years = 5
6+
console.log(`She has ${years} of experience in "Javascript"
7+
She has worked for Multiple companies`)
8+
9+
// OUTPUT
10+
11+
// She has 5 of experience in "Javascript"
12+
// She has worked for Multiple companies

0 commit comments

Comments
 (0)