toSource()

优质
小牛编辑
119浏览
2023-12-01

toSource 方法

返回 Math 对象源代码的字符串。

语法:

  Math.toSource();

注:

该方法在 Internet Explorer 中无效。

示例:

  var s = Math.toSource();

  console.log( s );
  console.log( typeof s );

结果:

  >>>
  Math
  string