“chaîne multiline javascript” Réponses codées

chaîne multiline javascript


// OPTION 1
var MultilineString = `This
is 
a multiline 
string`; // Note: use the template quotation marks above the tab key

// OPTION 2
var MultilineString = 'This \n\
is \n\
a multiline \n\
string'; // Note: use the "\n\" as a newline character
Jacques_Kirstein

JS Multiline String avec variables

const htmlString = `${user.name} liked your post about strings`;
FishBrawler

chaîne multiline javascript

    // Creating multi-line string
    var str = `<div class="content">
                  <h1>This is a heading</h1>
                  <p>This is a paragraph of text.</p>
               </div>`;
    
    // Printing the string
    document.write(str);
Anthony Smith

Chaîne de ligne multiples en js

const text = `Using the backtick character
you can define a string that
spans multiple lines.`;
Toutou Toutou

Réponses similaires à “chaîne multiline javascript”

Questions similaires à “chaîne multiline javascript”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code