HARMAN interview question

String methods in JavaScript and write a coding question