I am writing this post to ask for help from the wonderful members of the community while using Make.
What I want to implement seems to be complicated to explain, so I will keep it simple.
Using the add function in set variable, I want to subtract 100 from each value in the array {100,200,300}—the array name is price.
Subtract 100 from each value in the array {100,200,300}
I want to obtain the array {0,100,200} as a result.
Originally, when parseNumber was included in map(), an error message appeared saying that e should not be included, but this time that is not the case.
Please help me. ㅜㅜ Thank you.
Steps taken so far
I tried putting things in the map() function, but that didn’t work.
Subtracting a number from an array seems to result in a call to NaN, so that doesn’t seem to be possible either
Hi @Korean ,
I haven’t tested this, but I believe it should work:
map(yourArray; i; add(parseNumber(i); -100))
This will subtract 100 from each value in the array.
I was not able to solve this with map(). I apologize for not being able to help.
Below is the process and results we went through.
Take an array {100,200,300} (array values are all numbers)
map(testArray; item; add(item; -100)) >> Failed to map ‘value’: Function ‘map’ finished with error! Function ‘add’ finished with error! ‘item’ is not a valid array.