utm_form
utm_form copied to clipboard
Use of while loop for condition evaluation
https://github.com/medius/utm_form/blob/d7165cb254243ddcac155c559e280760ac431843/lib/utm_cookie.coffee#L56-L57
Should we use if
instead?
Not sure about if
statement, but there are other approaches that might be simpler. e.g. https://stackoverflow.com/questions/10730362/get-cookie-by-name
But to be honest, unless something is breaking, it might be better to keep this code as is. Not sure how much advantage there is by changing this part.
No problem. I just wanted to suggest a more efficient and elegant solution than using a loop for an evaluation.