Skip to content

Instantly share code, notes, and snippets.

@ikotse-code
Last active December 1, 2025 19:39
Show Gist options
  • Select an option

  • Save ikotse-code/0c27e2184dc0c5e9535bb54a90a92607 to your computer and use it in GitHub Desktop.

Select an option

Save ikotse-code/0c27e2184dc0c5e9535bb54a90a92607 to your computer and use it in GitHub Desktop.
//Assignment #1
function convertToFahrenheit (celsius: number):number {
return (celsius * 9 / 5) + 32;
}
function greetUser (firstName: string, lastName: string): string {
return ("Hello, " + firstName + " " + lastName + "!");
}
function calculateArea (width: number, height: number): number {
return (width * height);
}
function addNumbers (a: number, b: number): number {
return (a+b);
}
console.log(convertToFahrenheit(25));
console.log(greetUser("Anna", "Miller"));
console.log(calculateArea(4,5));
console.log(addNumbers(10,15));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment