Reason and validate the relations between intervals, and points and intervals, in JavaScript and TypeScript.