title: How to replace undefined value with a string
body: <p>I tried to use this code:</p>
  
  <pre><code>if((data.memberData.workStreak || 0) &gt;= 5){
              won+=400;
              embed.addField(message.language.get("WORK_CLAIMED_HEADINGS")[0], message.language.get("WORK_CLAIMED_SALARY", won))
              .addField(message.language.get("WORK_CLAIMED_HEADINGS")[1], message.language.get("WORK_AWARD"));
              data.memberData.workStreak = 0;
          } else {
              for(let i = 0; i &lt; award.length; i++){
                  if (typeof i === 'undefined') {
                     return '&lt;:b_:682865394637078531&gt;';
                  }
                  if(data.memberData.workStreak &gt; i){
                      let letter = Discord.Util.parseEmoji(award[i]).name.split("_")[1];
                      award[i] = ":regional_indicator_"+letter+":";
                  }
              }
  </code></pre>
  
  <p>But it did absolutely nothing.
  <a href="https://i.stack.imgur.com/QcNCG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QcNCG.png" alt="image"></a></p>
  
  <p>Any help?</p>