The solution to your problem is very simple.
Just assign a value to your name variable.
```ts
let name: string = "";
```
const name = (function() {
switch(index) {
case 0:
return "cat";
case 1:
return "dog";
default:
return "idk";
}
})()
**More on JS IIFE:** https://stackoverflow.com/a/8228308/21962459