Skip to content

Activity 1 completed for Day 8 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Day8/index.js
Original file line number Diff line number Diff line change
@@ -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}`);