Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ / Create an object type or interface for the following 'characters' array in typeScript / * RULES: Do not alter the character list name

// Create an object type or interface for the following 'characters' array in typeScript
/*
RULES:
Do not alter the character list
"name" can be any string since they are all unique
"faction" should only allow certain values (Jedi, Resistance, etc)
"lightsaberColor" should only allow certain values (blue, green, etc)
Not every character has "lightsaberColor"
"faction" may be a single string or an array (See Han Solo)
No criticism of the Disney trilogy except for Last Jedi
*/
/*
const characters =[
{
name: 'Rey',
faction: [ 'Jedi', 'Resistance' ],
episodeAppearances: [7,8,9],
lightsaberColor: [ 'blue', 'orange' ]
},
{
name: 'Luke Skywalker',
faction: [ 'Jedi', 'Rebellion' ],
episodeAppearances: [3,4,5,6,7,8,9],
lightsaberColor: [ 'blue', 'green' ]
},
{
name: 'Kylo Ren',
faction: [ 'Knights of Ren', 'First Order', 'Jedi' ],
episodeAppearances: [7,8,9],
lightsaberColor: [ 'red' ]
}
]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago