We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function deepClone(target) { let result // 判断是否是基本数据类型 if(typeof(target) === 'object'){ result = Array.isArray(target) ? [] : {} for(let prop in target) { if(target.hasOwnProperty(prop)){ result[prop] = deepClone(target[prop]) } } }else { // 基本数据类型 result = target } return result }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
简单版本
The text was updated successfully, but these errors were encountered: