Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Template Literals

let fourthItem = 'Item 4';
let myHtml = `
  <ol class="item-list">
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
    <li>${fourthItem}</li>
  </ol>
`;
Source by learn.codeinstitute.net #
 
PREVIOUS NEXT
Tagged: #Template #Literals
ADD COMMENT
Topic
Name
7+2 =