I've written a array for store language options.
public languageOptions:Array<Object> = [
    {
    name: 'English',
    value: 'en'
    },
    {
    name: 'France',
    value: "fr"
    }
];
And I want to set English as default language. I did it in following way,
private static readonly DEFAULT_LANGUAGE: string = 'en';
But I want to set 'en' value directly from the object array like this,
private static readonly DEFAULT_LANGUAGE: string = languageOptions[0].value;
But when I write that, it gives following error
[ts] Cannot find name 'languageOptions'
Can someone please help me to solve this problem. Please advice how to access 'en' from array object. Thank you.


languageOptionsfrom a static method--it doesn't make any sense. Perhaps you wantlanguageOptionsto be status too.