HPCC-12370 Changes to javascript following review comments

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>