Back

TS Basics / String Type

00:00
1/20

String Type

Easy

'Write a function greet(name: string): string that returns "Hello, name!".'

  • 1

    Specify the type for the parameter name as string.

  • 2

    Specify the return type as string.

TYPESCRIPT PLAYGROUND
TYPESCRIPT PLAYGROUND
⏳ Loading editor…