Neat way to handle array and individual inputs in same function
dev.to