Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 14 revisions

Checks if ith value is true. 📦 😺 🏃 📼 🌔 📜 📰 📘


boolean.select(i, [a], [b], [c], [d], [e], [f], [g], [h]);
// i: index
// a: 1st boolean
// b: 2nd boolean
// c: 3rd boolean
// d: 4th boolean
// e: 5th boolean
// f: 6th boolean
// g: 7th boolean
// h: 8th boolean
const boolean = require("extra-boolean");

boolean.select(0, true, false);
// true            ^

boolean.select(1, true, false);
// false                  ^

boolean.select(1, true, true, false, false);
// true                  ^

boolean.select(2, true, true, false, false);
// false                        ^


References

Clone this wiki locally