Skip to content

πŸ”§ A compilation of 45 solved TypeScript exercises focusing on core programming concepts such as variables, conditional statements (if-else), loops, functions, and more. Ideal for to build a strong foundation in TypeScript!

Notifications You must be signed in to change notification settings

syedmuneeb321/45-assignments-question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ TypeScript & Node.js Practice Exercises

Welcome to my repository! Here you will find solutions to a wide range of TypeScript and Node.js exercises. These exercises were designed to help beginners like myself get hands-on experience with basic programming concepts, all while having fun! πŸŽ‰

πŸ“‹ Table of Contents

πŸ›  Installation

Before you can dive into the exercises, make sure you have Node.js, TypeScript, and a code editor like VS Code installed on your system. Follow these simple steps to get started:

  1. Install Node.js from here πŸ–₯️.
  2. Install TypeScript globally:
    npm install -g typescript
  3. Clone this repository:
    git clone <your-repo-url>
    cd <your-repo-folder>
  4. Install Dependencies:
    Each exercise is independent, and if needed, run npm init inside the folder.
  5. Run the exercises:
    Compile TypeScript files:
    tsc filename.ts
    Then run them using Node.js:
    node filename.js

πŸ“š Exercises Overview

πŸ‘€ Personal Message

This simple exercise stores a person’s name in a variable and prints a greeting message. Example:

let name = "Eric";
console.log(`Hello ${name}, would you like to learn some TypeScript today?`);

You can view the complete solution here.

πŸ”‘ Name Cases

This program displays a name in lowercase, uppercase, and titlecase.You can view the complete solution here.

πŸ“ Famous Quote

Prints a famous quote with the author's name, demonstrating the use of string formatting.You can view the complete solution here,here.

🧼 Stripping Names

Trims leading and trailing whitespace from a string.You can view the complete solution here,here

βž• Number Eight

Performs arithmetic operations (addition, subtraction, multiplication, and division) to get the result 8.You can view the complete solution here,here

πŸ’– Favorite Number

Stores and displays a favorite number with a personalized message.You can view the complete solution here

πŸ‘₯ Names Array

Stores a list of names and prints each name from the array. You can view the complete solution here

πŸ’¬ Greetings

Personalized greetings for each name stored in an array.You can view the complete solution here

🍽️ Guest List

Creates a list of guests and sends them dinner invitations.You can view the complete solution here,here

πŸ“ˆ More Guests

Expands the guest list to invite more people and prints updated invitations.You can view the complete solution here

πŸ“‰ Shrinking Guest List

Shrinks the guest list by removing guests one by one and sending them apology messages.You can view the complete solution here

🌍 Seeing the World

Stores a list of favorite places and prints them in various orders (original, alphabetical, reverse).You can view the complete solution here

πŸ‘Ύ Alien Colors

A conditional program that prints a message based on the alien’s color.You can view the complete solution here,here,here

πŸ”„ Stages of Life

Uses if-else logic to determine a person’s stage of life based on their age.You can view the complete solution here,

πŸ‡ Favorite Fruit

Checks if certain fruits are in an array and prints a personalized message for each.You can view the complete solution here.

πŸ‘¨β€πŸ’» Hello Admin

Prints a greeting for users, with a special message for the admin.You can view the complete solution here,here,

πŸ”‘ Checking Usernames

Simulates checking if new usernames are available, comparing them to existing ones.You can view the complete solution here,

πŸ‘• T-Shirt Function

A function that accepts a shirt size and message, printing out the details of the shirt.You can view the complete solution here, here

πŸ™οΈ Cities Function

A function that describes a city and its country, with a default country parameter.You can view the complete solution here,here

πŸ§™β€β™‚οΈ Magicians

A function that prints magician names from an array, and modifies the array to prepend "The Great" to each name.You can view the complete solution here,

πŸ₯ͺ Sandwiches

A function that prints a summary of a sandwich order, with varying ingredients.You can view the complete solution here,

πŸš— Cars Object

A function that stores information about a car in an object and accepts arbitrary keyword arguments.You can view the complete solution here

πŸ“ License

This repository is open-source and licensed under the MIT License. Feel free to explore, learn, and contribute!

About

πŸ”§ A compilation of 45 solved TypeScript exercises focusing on core programming concepts such as variables, conditional statements (if-else), loops, functions, and more. Ideal for to build a strong foundation in TypeScript!

Resources

Stars

Watchers

Forks

Packages

No packages published