.todo/miapp.tools.array.js
function replaceValueFromList(list, oldValue, newValue) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == oldValue) {
            return list.splice(i, 1, newValue); // remove from array and replace by the new object
        }
    }
    return false;
}
function replaceValueFromList(list, oldValue, newValue) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == oldValue) {
            return list.splice(i, 1, newValue); // remove from array and replace by the new object
        }
    }
    return false;
}
function replaceValueFromList ( list , oldValue , newValue ) { for ( var i = list . length - 1 ; i >= 0 ; i -- ) { if ( list [ i ] == oldValue ) { return list . splice ( i , 1 , newValue ) ; // remove from array and replace by the new object } } return false ; }
Replace in list the last object being equal to oldValue.
Beware, this can insert duplicates in the list !

@param list Array of objects comparable to oldValue
@param oldValue
@param newValue New object replacing the old one
@return {*} Array of replaced item or false
Replace in list the last object being equal to oldValue . Beware this can insert duplicates in the list !