#code optimization tip

4 messages · Page 1 of 1 (latest)

solemn swift
#

i'm doing the basketball pointer challenge hardcoded and never saw the lessons "skeleton code" (i dont pretend to until im done) and surely theres a more optimal way to do this? i feel like i can write a single function for each button but i cant figure out how, haven't i learned this yet or am i just dumb lol

radiant orchid
#

hi! if you add amount as a parametr to your function and add it to your count var when you reasing it inside the function it will work

#

because you are hardcoding the values inside the function thats the issue

solemn swift