Ad
  • Custom User Avatar

    you are a genius... if you thought of it yourself

  • Default User Avatar

    It's reversing because the i is being pushed each time in the new string which is making it reversed
    let's say input is "hello world"
    when we're running this code we're putting in h first time thn e thn l thn l thn o and so on
    so h is being pushed to right which is making it go reverse
    h first thn e being - eh thn l so leh like this
    I'm a newbie too btw hope this helps