Make Permutation!

wanni kim·2021년 4월 9일
0
post-thumbnail
function makePermutations(str) {
  let result = '';
  for (let left = 0; left < str.length; left++) {
    for (let right = 0; right < str.length; right++) {
      result = result + `${str[left]}${str[right]},`;
    }
  }
  return result.slice(0, result.length - 1);
}

바로 이해하지 못한다 계속 보자 박제하고

profile
Move for myself not for the others

0개의 댓글