상수 추출

Jmnote (토론 | 기여)님의 2022년 12월 17일 (토) 00:25 판 (→‎개요)

1 개요

Replace Magic Number with Symbolic Constant
매직 넘버를 상징적 상수로 교체
매직 넘버를 의미 있는 이름으로 교체
for( let i=1; i<=52; i++ ) {
    j = i + randomInt(53 - i) - 1
    a.swapEntries(i, j)
}
for( let i=1; i<=52; i++ ) {
    j = i + randomInt(53 - i) - 1
    a.swapEntries(i, j)
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}