Javascript's accommodative helper