Js replaces the elements in the array according to the identity?

I will get an array, such as: [1], then 1 corresponds to apple, 2 corresponds to watermelon, and 3 corresponds to durian.
what I can think of for the time being is:

        let arr = this.checkboxGroup1
        for(let k in arr){
            if(arr[k] == 1){
                arr[k] = ""
            }else if(arr[k] == 2){
                ....
            }
            ....
        }
        

in fact, my array may have 20 elements. It will be troublesome to write this. Please give me some advice on the simple method

.

the final requirement is to get an array of pure fruit to display


do relational mapping first:

let tag={
    "1":"",
    "2":"",
    "3":""
}
let arr=[1,2,3]
for(let i=0;i<arr.length;iPP){
    console.log(arr[i]+":"+tag[arr[i]])
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b314f1-2bd79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b314f1-2bd79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?