I'm not sure the question title is right. Let's say I have:
var myArray=[12, 1, 25];
I want to write a function such as the following "multiply" function so that I can:
var newArray = myArray.multiply(7)
and the result would be:
newArray=[12*7, 1*7, 25*7]
But I'm not referring only to an array. Initial variable could be a string to do something with.