how can I apply the ?? operator in JS (can I do it anyway ?) I just want to assing the default value to someVariable if defaultDirection is undefined or get the defaultDirection value if it's not
function myFunc(defaultDirection) {
    var someVariable = defaultDirection ?? false;
}
 
    