Interactive tracing and program construction with JavaScript