Logical Programming Questions In Javascript The Xy