How to check if a number or a string is a valid port number in JavaScript?
Originally Published Here ๐!
To check if a number or a string is a valid port number, we can use a regex expression to match for all the numbers from 0 till 65535 in JavaScript.
TL;DR
// Regular expression to check if number is a valid port number
c...
melvingeorge-me.hashnode.dev2 min read