Build a Voting System - Build a Voting System

Tell us what’s happening:

i don’t know what’s votes ?? is it an object or array or what should i do,

Your code so far

const poll = new Map()

const addOption = (option) => {

}
const vote = (option, voterId) => {

}
const displayResults  = () => {

}
poll.set('option-i', 'option1').set('option-ii', 'option2').set('option-iii', 'option3').set('vote-i', 'vote-1').set(['option1', 'option2', 'option3'])

console.log(poll)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Challenge Information:

Build a Voting System - Build a Voting System
https://www.freecodecamp.org/learn/full-stack-developer/lab-voting-system/build-a-voting-system

  • your “poll” suppossedly to have some “options” which can be used for “voting”
  • in your implementation of “Map” it needs more work

happy coding :slight_smile:

i wasn’t notice that i get votes from vote function,
late i noticed, thanks for your help

although i observed others’s solutions but i can’t do it by my self,
i need to execute it all from scratch by my self,
but i can’t cover it as well as it should be.

share your updated code and ask away, happy coding :slight_smile:

i copied someone is code to some point and iam trying to learn from it, then i found missing tests iam trying to solve it myself,
and the end when i finish i will re do it all my self again,
what you see, cuz i felt depressed the first time i saw ppl passed it all and i can’t do anything about it yet :slight_smile:

many people ask for help with this challenge, take your time, and try to do all the code yourself, do not copy the code from others, it’s the best way to learn

you can always post your code here, and ask for help

2 Likes

i feel inability somehow, but i got an idea .
I will cut the problem into small chunks ,
i will face the first step myself,
if i couldn’t pass it myself,
read - ask - search method
then iam coming back to ask you :slight_smile:

if you want a more instantaneous chat to bounce ideas back and forth you can join the Discord server (https://chat.freecodecamp.org/)

i got a problem when iam trying to log into my mail,
first when i tried to register it said that this mail is already registered
when i try to use forget password button,
it says that my account has been disabled

if you mean on Discord, we are not Discord support, we are not able to help

sorry for that, i lost my focus now i logged with my alternate mail, i will try the link you gave to me, i see many channels , choices i donno what specifically should i pick

now iam over there on the fcc channel

I think you should study the theories and practice the workshop before attempting the certification project

yes, i do. iam not jumping on lessons and theories ,
sometimes i read and re-read the theory more than one time

plus i succeed solved this challenge too :slight_smile:
your reply comes after 18 days :smiley:

1 Like