Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript tick marks

/* Template Literals/Strings are enclosed by backticks (``)
rather than quotes. They allow expressions to be embedded 
within ${expression} placeholders.
These expressions can be passed to a function. 
Any newline characters are part of the template literal. */

let a = 3;
let b = 4;
let firstName = "John";
let lastName = "Smith";

// Compare with template literals.
console.log(`3 * 4 = ${a * b},
according to ${firstName} ${lastName}.`);

// Versus without.
console.log("3 * 4 = " + (a * b) +  
",
according to " + firstName + " " + lastName + ".");
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #tick #marks
ADD COMMENT
Topic
Name
9+1 =