Math.random() javascript function *undefined* on Chrome

前端 未结 4 1665
忘掉有多难
忘掉有多难 2020-12-21 14:09

In first place, I am convinced that this is a trivial question, but I cannot understand why this is happening and I couldn\'t find an answer anywhere else. I googled my issu

4条回答
  •  無奈伤痛
    2020-12-21 15:04

    Another library on your page is overriding the Math object. This is one of the reasons that polluting the Global Namespace is frowned upon.

    For reference Math should return the following

    enter image description here

提交回复
热议问题