First Student interview question

reverse string in js and service now platform