js code segment