'what does " || " mean inside an array of function/strings [duplicate]
i'm reading about a ui framework (quasar) and they have a component (q-input) that have a prop(rules) of type array of function/strings
<q-input
filled
type="number"
v-model="age"
label="Your age *"
lazy-rules
:rules="[
val => val !== null && val !== '' || 'Please type your age',
val => val > 0 && val < 100 || 'Please type a real age'
]"
/>
what i don't understand is what the purpose of the characters (||) that they use to separate function and strings
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|