Back

Classes & Interfaces / Simple Class

00:00
1/20

Simple Class

Easy

'Define a class Point with x and y as numbers and a constructor to initialize them.'

  • 1

    Declare properties with types.

  • 2

    Initialize them in the constructor.

TYPESCRIPT PLAYGROUND
TYPESCRIPT PLAYGROUND
⏳ Loading editor…