-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
30 lines (27 loc) · 866 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// note: Normal String Concatenation
/*const demoVariable = 'Hello';
console.log("I'm" + hello + "from India");
*/
// note: Template Literals
/* const demoVariable1 = 'Hello';
const name1 = 56;
const name2 = 90;
console.log(`I am ${demoVariable1} from India`);
console.log(`The value of ${name1 + name2} is 146`);
*/
//note: Multi-line strings
/* console.log('Hello \n\DemoName \n\lines') */
/* soln: Hello
DemoName
lines */
//imp!: This can be easily added with the help of template Literals
console.log(`Hello
DemoName
lines`)
/* soln: Hello
DemoName
lines */
//imp!: For multiline strings, Always use template Literals
//theory: Template Literals are available in JavaScript from ES6
//theory: Single quotes and double quotes work inside the template literal
//theory: We can also use backticks for any regular strings