Dot voting system in node js / javascript