is there a way to access an external variable inside a javascript function ? In other words, is there an equivalent of "use" in php
function ($quantity) use ($tax, &$total) { .. };
The code i'm struggling with is the following :
function removePosition(menu) {
msgManager.confirm('Delete ?').then(() => {
menu.closest('.clockingPositionContainer').remove();
});
}