if( [80, 443].indexOf(port) !== -1 && http === false )
For N ports, or for a port list defined from a config file however it could be. It's even nicer in python:
ports = [80, 443, ...] if port in ports and http: ...
var ports = [80, 443, ...]; if(_(ports).contains(port) && http) { ... }