Answer the question
In order to leave comments, you need to log in
How to write so that an object is not equal to undefined?
const obj: {
[ key: string ]: number
} = {
"RUB": 83
}
const txt: {
left: string;
} = {
left: "RUB"
};
const qq = 1000 / obj[txt.left];
const ww = obj[txt.left] as number
const qq = 1000 / ww;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question