The validation code is usually tedious unless you are using a very cool helper library like Joi Otherwise: Consider this – your function expects a numeric argument “Discount” which the caller forgets to pass, later on, your code checks if Discount!=0 (amount of allowed discount is greater...