P99soft interview question

reverse the string in java script