Skip to content

Commit cc67e7a

Browse files
Merge pull request #18 from yashksaini-coder/backup
Activity 1 completed for Day 8 Co-authored-by: Garv Saini <garvkumarsaini@gmail.com>
2 parents bbfb8d6 + 353343e commit cc67e7a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Day8/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
console.log("-------------------------------------------------");
2+
console.log("Activity 1: ");
3+
4+
// Task 1: Use template literals to create a string that includes variables for a person's name and age, and log the string to the console.
5+
6+
let name = "John";
7+
let age = 30;
8+
console.log(`My name is ${name} and I am ${age} years old.`);
9+
10+
// Task 2: Create a multi-line string using template literals and log it to the console.
11+
12+
let multiLineString = `This is a multi-line string.
13+
It is created using template literals.
14+
It is very convenient to use.`;
15+
console.log(`This is multiLineString:- ${multiLineString}`);
16+

0 commit comments

Comments
 (0)