diff --git a/EFeSKC/kBXNqy.ts b/EFeSKC/kBXNqy.ts new file mode 100644 index 0000000..73dd8d2 --- /dev/null +++ b/EFeSKC/kBXNqy.ts @@ -0,0 +1,15 @@ +function capitalizeFirstLetter(inputString: string): string { + if (inputString.length === 0) { + return inputString; // Return the original string if it's empty + } + + const firstLetter = inputString[0].toUpperCase(); + const restOfString = inputString.slice(1); + + return firstLetter + restOfString; +} + +// Example usage: +const input = "hello world"; +const capitalized = capitalizeFirstLetter(input); +console.log(capitalized); // Output: "Hello world"