Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Validating user input

node v14.20.1
version: 1.0.0
endpointsharetweet
const validZipCodes = [90210, 12345, 11111]; function isZipCodeValid(zipCode) { return validZipCodes.includes(zipCode); } console.log(isZipCodeValid(90210)); // Output: true console.log(isZipCodeValid(22222)); // Output: false
Loading…

no comments

    sign in to comment