Tati

Documentation Home | Class Docs | Github | npm Package ||| Simple Demo | Dual Debuggers

Like other demos, you can change the code, and also toggle breakpoints by clicking on the gutter.

Hint: Start and then Continue both scripts to get what is going on, then play around!
// Note that running will continue after script end, 
// because of the timeout. It can be stopped by clearing 
// the timeout. 

// You can pause the execution to prevent setting a new 
// timeout. You may also set a breakpoint in the timer 
// callback function, it will be stopped upon reaching it, 
// even after the script is ended. That is why the puase 
// button is still enabled after the end.

function addAlpha() {
  alpha+=1;
  updateOutput();
}

setInterval( addAlpha, 10 );

let inc = 1;

function addBeta() {
  beta+=inc;
  updateOutput();

  if(beta>=160) {
  	inc=-1;
  }
  else if(beta<=0) {
    inc=1;
  }
}

setInterval( addBeta, 10 );


|||
					
Copyright (C) 2022-2024 Arash Kazemi <contact.arash.kazemi@gmail.com>
(Tati project is subject to the terms of BSD-2-Clause License, for more information see the LICENSE file in the root directory of the project)