title: Getting the length of a float value
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var string = -526.56;
  var string1 = "-526.56";
  
  console.log("string " + string.length)
  console.log("string " + string)
  console.log("string1 " + string1.length)
  console.log("string1 " + string1)</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am getting the length of a float but it is returning <code>undefined</code>.
  What is the correct way to get the length of a float?
  Basically i want to make sure that the float is has value. At first I compare it to greater than 0 but then i am getting negative values so I decided to get the length but also it failed the if statement because it is returning undefined.</p>