Skip to content

Greeting

TypeScript prompt → console.log

Same task in: PythonJavaScriptPHP

Flowchart (ISO 5807)

StartInput nameOutput «Привіт, » + nameEndFigure 1 — greet

Source code

TypeScript
function greet(): void {
    const name = prompt("Ім'я:");
    console.log("Привіт, " + name);
}

The editor opens with this code — change it and the chart redraws.

Language
TypeScript
Constructs
prompt → console.log
Topic
Input/Output
Formats
Word, Visio, draw.io, PDF, SVG

Related examples