• This project
    • Loading...
  • Sign in

이혜연 / Make_your_own_ chatbot

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • make_your_own_chatbot
  • node_modules
  • clean-css
  • lib
  • utils
  • clone-array.js
  • hyeyeon-sun's avatar
    Clone Mother project · 28fcf250
    28fcf250
    hyeyeon-sun authored 2020-05-30 15:54:06 +0900
clone-array.js 241 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12
function cloneArray(array) {
  var cloned = array.slice(0);

  for (var i = 0, l = cloned.length; i < l; i++) {
    if (Array.isArray(cloned[i]))
      cloned[i] = cloneArray(cloned[i]);
  }

  return cloned;
}

module.exports = cloneArray;