training java script