Skip to content

Comments

dicek ya sir#1

Open
reksavertx wants to merge 7 commits intoEthereum-Jakarta:mainfrom
reksavertx:main
Open

dicek ya sir#1
reksavertx wants to merge 7 commits intoEthereum-Jakarta:mainfrom
reksavertx:main

Conversation

@reksavertx
Copy link

No description provided.

Copy link
Contributor

@harkon666 harkon666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job


};
let hasil = "";
for (let i = 0; i < str.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sebenernya start i = 1 dan i < str.length - 1 itu juga solusi yg lebih clean dan tanpa perlu if else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tapi good job, ini juga termasuk benar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ini sebenernya bisa lebih clean kalau if else modulus nya didalam loop j

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jadi ga perlu for loop yang redundan (dipakai berulang) di dalam if

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overal jawaban benar, jadi lanjutkan, diatas hanya review

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ini juga berlaku ketimbang codenya jadi panjang karena di dalam if else ada loop, better cukup nested loop dan isinya cuma if else, lebih clean code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants