Skip to content

for github badge #532

Answered by abdurahmon27
Xondamirxon asked this question in Q&A
Discussion options

You must be logged in to vote

`
function reverseString(input) {
let reversed = '';
for (let i = input.length - 1; i >= 0; i--) {
reversed += input[i];
}
return reversed;
}

// Example usage:
console.log(reverseString("hello")); // Output: "olleh"
`

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Xondamirxon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants