invalid.splice(index,1);// Remove the value from the voided array
valid.push(value);// Add the value to the valid array
console.log(`Moved "${value}" from voided to valid.`);
}else{
console.log(`"${value}" not found in voided.`);
}
}
toValid('098765')
valid
invalid
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.