Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

multi-line string shorthand javascript

// Multi-line String Shorthand
// Longhand:
const lorem = 'Lorem ipsum dolor sit amet, consectetur
	'
    + 'adipisicing elit, sed do eiusmod tempor incididunt
	'
    + 'ut labore et dolore magna aliqua. Ut enim ad minim
	'
    + 'veniam, quis nostrud exercitation ullamco laboris
	'
    + 'nisi ut aliquip ex ea commodo consequat. Duis aute
	'
    + 'irure dolor in reprehenderit in voluptate velit esse.
	'
console.log(lorem);

// Shorthand: use backtick
const lorem_ = `Lorem ipsum dolor sit amet, consectetur
    adipisicing elit, sed do eiusmod tempor incididunt
    ut labore et dolore magna aliqua. Ut enim ad minim
    veniam, quis nostrud exercitation ullamco laboris
    nisi ut aliquip ex ea commodo consequat. Duis aute
    irure dolor in reprehenderit in voluptate velit esse.`
console.log(lorem_);
Comment

PREVIOUS NEXT
Code Example
Javascript :: firebase messaging service not working with electron 
Javascript :: how to make console log hello in discord.js 
Javascript :: reduce tally 
Javascript :: escape exponential input number in js 
Javascript :: how to get last index of array in javascript 
Javascript :: how to make image slider in react js 
Javascript :: animated progress bar cdn 
Javascript :: create sub array from array with values that pass condition javascript 
Javascript :: key html 
Javascript :: Simple Email Validation, Case Insensitive, w/ All Valid Local Part Characters (whatever tf that means to you...), 2nd Example - Regex 
Javascript :: react native paper touchable ripple 
Javascript :: cercle progress bar angular 
Javascript :: check version of 3rd package npm 
Javascript :: the specified value cannot be parsed or is out of range javascript 
Javascript :: loadash 
Javascript :: how to check null and undefined 
Javascript :: find a big length friend from array javascript finding longest string in array in javascript 
Javascript :: Private slots are new and can be created via Private methods and accessors 
Javascript :: how to add a key to every html tag in a list react 
Javascript :: HimalayanCoffeeHouse Noida 
Javascript :: new http version ANGULAR 
Javascript :: how to add heaeader to http angular client 
Javascript :: send data with next 
Javascript :: Key and property shorthand in ES6 
Javascript :: json_populate_recordset 
Javascript :: Write File to the Operating System with NodeJS 
Javascript :: javascript values 
Javascript :: dollar sign brackets javascript 
Javascript :: jquery console.log object file 
Javascript :: Javascript - The file size is measured in bytes 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =