“Boolean js umschalten” Code-Antworten

JavaScript -Umschaltvariable

var thing = true; //try changing this to false
thing = !thing; //the variable will go from true to false, or from false to true
The Amateur

Boolean js umschalten

const toggleBool = (val) => (val = !val)

toggleBool(false) //true
Noob Dev

Ähnliche Antworten wie “Boolean js umschalten”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen