From 353343e91e2ccdd626a32f6e2d970eb62d676a30 Mon Sep 17 00:00:00 2001 From: Yash Kumar Saini <115717039+yashksaini-coder@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:38:39 +0530 Subject: [PATCH] Activity 1 completed for Day 8 Co-authored-by: Garv Saini --- Day8/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Day8/index.js b/Day8/index.js index e69de29..b278f97 100644 --- a/Day8/index.js +++ b/Day8/index.js @@ -0,0 +1,16 @@ +console.log("-------------------------------------------------"); +console.log("Activity 1: "); + +// 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. + +let name = "John"; +let age = 30; +console.log(`My name is ${name} and I am ${age} years old.`); + +// Task 2: Create a multi-line string using template literals and log it to the console. + +let multiLineString = `This is a multi-line string. +It is created using template literals. +It is very convenient to use.`; +console.log(`This is multiLineString:- ${multiLineString}`); +