mete clone in JavaScript