Yes it is . People being on opposite ends of the political spectrum does not at all imply they are not alike . If you think that ' s the case you ' re living in a onesided bubble . <| sep |> At 18 you can buy a gun . Then you just need to rob the liquor store . Problem solved <| sep |> That would be a lot nicer , but that ' s not the only thing that is very very wrong with this snippet . I would have done it like this use strict function isSetvariable return variable ! undefined variable ! null function c r e a t e B lankGTEventsTablecalEvent code not in snippet . function addGTEventitem , calEvent ifitem null c r e a t e B lankGTEventsTablecalEvent return ERROR EVENT ALREADY RECORED ! switchfalse case isSetitem . GSelectedGroupText return ERROR NO SELECTED GROUP TEXT ! case isSetitem . GSelectedGroupValue return ERROR NO SELECTED GROUP ID ! case isSetitem . GSelectedGroupRoomText return ERROR NO SELECTED ROOM TEXT ! case isSetitem . GSelectedGroupRoomValue return ERROR NO SELECTED ROOM ID ! case isSetitem . GSelectedTutorText return ERROR NO SELECTED TUTOR TEXT ! case isSetitem . GSelectedTutorValue return ERROR NO SELECTED TUTOR ID ! if ! isSetcalEvent . groupTeachingEvents typeof calEvent . groupTeachingEvents boolean calEvent . groupTeachingEvents calEvent . groupTeachingEvents . push group id item . GSelectedGroupText , name item . GSelectedGroupValue , location id item . GSelectedGroupRoomText , name item . GSelectedGroupRoomValue , tutor id item . GSelectedTutorText , name item . GSelectedTutorValue window . gData . calEvent calEvent