An array is a container of a fixed number of objects of a similar type. It is a fundamental component of most programming languages.
Object-oriented programming is a paradigm based on encapsulating logic and data into objects, which may then contain fields and procedures. Many of the most widely used programming languages are based on OOP, making it a very important concept in modern programming.
Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
The following code initializes three types representing the colors: red, green and blue.
type ColorType = [string, number, number, number]; let red: ColorType = ['Red', 1, 0, 0]; let green: [string, number, number, number] = ['Green', 0, 1, 0]; let blue = ['Blue', 0, 0, 1];
Select all the statements that are correct.