1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-07-18 02:20:12 +02:00
programming-challenges/templates/solution/typescript/solution.ts

16 lines
344 B
TypeScript

import readline from "node:readline"
const input: string[] = []
const readlineInterface = readline.createInterface({
input: process.stdin,
output: process.stdout,
})
readlineInterface.on("line", (value) => {
input.push(value)
})
readlineInterface.on("close", solution)
function solution(): void {
console.log(`Hello, ${input[0]}!`)
}