Closed marlitas closed 2 years ago
When converting, let's also remember to search for parseFloat, and Number.parseInt.
@jbphet discovered an infinite loop in Expression Exchange that we traced back to another inconsistency between parseInt() and Number(). Below screenshot demonstrates the issue as it relates to Expression Exchange.
PSA: Number( '' ) => 0 vs. parseInt( '' ) => undefined
From dev meeting today. @marlitas is still chipping away at this. Moving to subgroups
Conversion done. Will leave issue open for a few days in case something comes up that I didn't see in testing.
I did not find any CT errors related to the Number() conversion in the last few days. Closing
This issue comes from a discussion in: https://github.com/phetsims/perennial/issues/274
What is the best string => number conversion for PhET usage. A couple of things to note that have come up from initial discussions/research:
Historically PhET devs have preferred parseInt(), should that change?