I've tried the format like
['mobile-number', 'name', 'about'].includes(stages)
But that doesn't seem to work.
if (stages.includes('mobile-number') || stages.includes('name') || stages.includes('about')) {
array.push('about-you')
}
I've tried the format like
['mobile-number', 'name', 'about'].includes(stages)
But that doesn't seem to work.
if (stages.includes('mobile-number') || stages.includes('name') || stages.includes('about')) {
array.push('about-you')
}
Your looking for Array.prototype.some
stages.some(s => ['mobile-number', 'name', 'about'].includes(s))
This is the exact alternative of stages.includes('mobile-number') || stages.includes('name') || stages.includes('about')