continue traps implementation

added to JavaScript code