You know how we can already use ternary to do basic IF conditions, e.g.
Code: Select all
msg (confirm("Are you sure?")) ? "You are!" : "You're not...";To test if both conditions are true (AND), simply check the sum is 2, and to check at least one is (OR), that it is at least 1
Code: Select all
// AND:
msg (confirm("Are you sure?") + confirm("Are you really sure?") == 2) ? "So you are sure" : "You need to be 100% sure";
// OR:
msg (confirm("Are you sure?") + confirm("Are you really sure?") >= 1) ? "Good enough" : "Well then...";
XYplorer Beta Club