好的,我很难过,主要是因为我使用的javascript不够。我知道这是一个数组指针问题(我必须在函数中复制数组......),但不知道如何解决它。我能麻烦您解释一下为什么我的 Javascript 版本不起作用而 Python 版本起作用吗?它应该反转一个数组(我知道有一个内置的),但我的问题是:Javascript 中的数组与 Python 中的数组有何不同?
Javascript (does not work): 
function reverseit(x) {
  if (x.length == 0) { return ""};
  found = x.pop();
  found2 = reverseit(x);
  return  found + " " + found2 ;
};
var out = reverseit(["the", "big", "dog"]);
// out == "the the the"
===========================
Python (works):
def reverseit(x):
    if x == []: 
        return ""
    found = x.pop()
    found2 = reverseit(x)
    return  found + " " + found2
out = reverseit(["the", "big", "dog"]);
// out == "dog big the"