Decision Making of Javascript Programs