Do you have to recode values or could you possibly use column property Value Labels (this way you won't loose the original data), example: Recode multiple columns with JSL script
Edit:
And if you have to recode them in place, there are multiple ways to do it (I would use Associative Array):
Names Default To Here(1);
dt3 = current data Table ();
n3 = dt3 << Get Column Names(string);
show(n3);
//create associative array to use matching keys to values
matchAa = Associative Array(
{"1","2","3","4","5"},
{"too low","too low","right","too high","too high"}
);
show(matchAa);
//loop over column names
For(i = 1, i <= N Items(n3), i++,
//refer to column and use set each value to update values
Column(dt3, n3[i]) << Set Each Value(
matchAa[AsColumn(n3[i])[Row()]]
);
);
And for your solution I think there is an issue in how you refer to values in Match function and you have to add [Row()] to get single values for Matching
Match(As Column( lstColNames_n3[i])[Row()],
Edit2:
Added full example script as attachment
-Jarmo