R

@Raza74

Ex_06

TypeScript
2 years ago
/* Stripping Names: Store a person’s name, and include some whitespace characters at the beginning and end of the name. Make sure you use each character combination, "\t" and "\n", at least once. Print the name once, so the whitespace around the name is displayed. Then print the name after striping the white spaces. */ const myName:string = "Raza Rizvi"; console.log(myName);

Ex_05

TypeScript
2 years ago
/* Famous Quote 2: Repeat Exercise 4, but this time store the famous person’s name in a variable called famous_person. Then compose your message and store it in a new variable called message. Print your message. */ let famous_person: string = "Albert Einstein"; let message: string = `\"Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution.\" - ${famous_person}`; console.log(message)

Ex_04

TypeScript
2 years ago
/* Find a quote from a famous person you admire. Print the quote and the name of its author. Your output should look something like the following, including the quotation marks: Albert Einstein once said, “A person who never made a mistake never tried anything new.” */ const myQuote: string = 'Albert Einstein once said, “A person who never made a mistake never tried anything new.” ' // backtick console.log(myQuote);

Ex_02

TypeScript
2 years ago
/* Store a person’s name in a variable, and print a message to that person. Your message should be simple, such as, “Hello Eric, would you like to learn some Python today?” */ let personName: string = "Eric"; console.log("Hello "+ personName + ", would you like to learn some Python today?");

Ex_03

TypeScript
2 years ago
/* Store a person’s name in a variable, and then print that person’s name in lowercase, uppercase, and titlecase. */ const personName: string = "Raza Rizvi"; // lowerCase console.log(personName.toLowerCase());

ex_01

TypeScript
2 years ago
const message:string = "hello world!"; console.log(message);