Put in order · JavaScript and TypeScript course · Module 5: Advanced JavaScript
Method Chaining Syntax in Builder
Arrange the elements for creating an object with the Builder pattern:
Items to put in order
- new DinosaurBuilder("Rexy", "T-Rex")
- .setAge(8)
- .setDiet("carnivore")
- .build()
You can check the correct answer by solving this task in the CodeWorlds game.