There are two arrays that I'm working with,
The first array is defined as var symbols = ['A', 'B'];
, and the second array is defined as var num = ['3', 'A', '5', '4'];
I am looking for a solution to replace each element in the num
array that matches an element in the symbols
array by adding 10 to the index of that matching element in the symbol
array.
So, the expected result would be:
num = ['3', '10', '5', '4']
How can I achieve this replacement for all occurrences?