ScriptChain interview question

Coding challenge unrelated to position