In JavaScript, you can simply write an empty block or an empty function to represent “do nothing”:
function myFunc() {
// do nothing
}
or
if (condition) {
// empty block acts like pass
}
It’s the closest equivalent to Python’s pass.
In JavaScript, you can simply write an empty block or an empty function to represent “do nothing”:
function myFunc() {
// do nothing
}
or
if (condition) {
// empty block acts like pass
}
It’s the closest equivalent to Python’s pass.