Can I make a back button in app lab?

My students are successfully using setScreen to move from one screen to another. However, they want to use a back button to return to whichever screen the user just came from. Does anyone know how to do this?

Thanks!

so… this may be more complicated depending on how many screens your students may have but storing the screen name in a variable should do the trick

var currentScreen = "screen1"
var previousScreen = "";
function changeScreen(id) {
previousScreen = currentScreen;
setScreen(id);
currentScreen = id;
}

though if your students are looking for something further back like tracing paths you took through multiple screens you’ll need to do a big lesson for that and I’m not even sure if you should. this should just help get there feet wet to get a feel for it either that or setting back buttons on each screen of which you’ll pretty much need anyways using setScreen(id)will allow screen navigation in your program