Exit keyword



Exit keyword
Pas2JS pascal source code
function Test1: Integer; begin Result := 1; Exit; Result := 2; end; function Test2: Integer; var i: Integer; begin for i := 1 to 10 do begin Result := i; if i = 2 then Exit; end; end; WriteLn(Test1); // 1 WriteLn(Test2); // 2 Exit; WriteLn('Not writelned');