KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm sure this is a simple problem, but I'm comparing negative numbers in javascript i.e.: var num1 = -83.778; var num2 = -83.356; if(num1 < num2) { // Take action 1 } else { // Take action 2 } This script will always take action 2, even though num1 is less than num2 . Whats going on here?
Tags (comma-separated)
Save Edits
Cancel