Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • I can't reproduce your problem here. Also, there's more code to this you aren't sharing with us. For instance, what's creating the px and py values? Commented Mar 3, 2018 at 22:12
  • Also, when you print to the console and expand, you are seeing what the values are currently in memory. Not what they were when you printed it. Commented Mar 3, 2018 at 22:12
  • Thank you Mark for your reply, I have pasted the entire code that I am working with. I cant see the circles I am trying to draw dynamically and the console suggests x and y values are Nan. Is there any other way to see/preserve the values of x and y for debugging. Sorry it might be a stupid question, I've just started with js Commented Mar 3, 2018 at 23:06