Heim  >  Fragen und Antworten  >  Hauptteil

Ist 500 ein Gleitkommatyp?

document.write(parseInt("500eps")+"<br/>");


Nach dem Extrahieren des Gleitkommatyps ist die Ausgabe dieser Zeile „500“, sollte es nicht „non“ sein ? (Ganzzahlen sind Ganzzahlen und Dezimalzahlen sind Gleitkommazahlen. Gibt es ein Problem mit diesem Verständnis?)

益伦益伦2604 Tage vor1471

Antworte allen(3)Ich werde antworten

  • 帅锅

    帅锅2017-09-05 12:16:08

    是的~

    来我群里一起探讨交流呗~群里很多大牛的
    218289437

    Antwort
    0
  • ringa_lee

    ringa_lee2017-09-04 09:21:13

    parseInt强制转化为整型,会截取字符串前几位数字的,eps则过滤掉了,所以是500

    Antwort
    0
  • 微祥云

    微祥云2017-09-04 01:30:25

    没问题

    Antwort
    0
  • StornierenAntwort