refactor ok in javascript task 3325.