Horje
javascript template literals Code Example
string literal javascript
`string text`

`string text line 1
 string text line 2`

`string text ${expression} string text`

tag`string text ${expression} string text`
javascript template literals
//Must use backticks, `, in order to work.

let a = 5;
let b = 10;
console.log(`Fifteen is ${a + b} and
not ${2 * a + b}.`);

//Output:
//Fifteen is 15 and not 20.
template literal syntax
`half of 100 is ${100 / 2}`
Template literals in js
var str = 'Release date: ' + date // ES5
let str = `Release Date: ${date}` // ES6




Javascript

Related
if media queries jquery Code Example if media queries jquery Code Example
js get vh value Code Example js get vh value Code Example
get url parameter in react js Code Example get url parameter in react js Code Example
jquery find highest value in array Code Example jquery find highest value in array Code Example
how to check if a user is logged in javascript Code Example how to check if a user is logged in javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7