Array variable

    0

    4

    Giovanny Gongora

    Codiga's TypeScript Recipes

    Array types can be written in one of two ways. In the first, you use the type of the elements followed by [] to denote an array of that element type. If no types are declared, TypeScript will automatically assign a type depending on the types of the Array values.

    const hobbies: string[] = ['Codiga', 'Assistant'];
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.