Closed RubyLouvre closed 9 years ago
var oldLength = son.length
var newLength = value.length
var n = oldLength
if(oldLength > newLength){
var i = oldLength - newLength
son.splice(newLength, i )
n = newLength
}
if(oldLength < newLength){
var i = newLength - oldLength
son.pushArray(value.slice(oldLength))
}
for(var i = 0; i < n ;i++){
son.set(i, value[i])
}