JavaScript Math toSource 方法

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

JavaScript Math toSource 方法语法

  Math.toSource();

注:

该方法在 Internet Explorer 中无效。

JavaScript Math toSource 方法示例

  var s = Math.toSource();

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

JavaScript Math toSource 方法结果

  >>>
  Math
  string

最后修改:2023 年 05 月 31 日
如果觉得我的文章对你有用,请随意赞赏