Utilities

一、util.format(format[, ...])
 
    1、格式说明

  • %s - String.
  • %d - Number (both integer and float).
  • %j - JSON. Replaced with the string '[Circular]' if the argument contains circular references.
  • %% - single percent sign ('%'). This does not consume an argument.
    2、示例如下
 
 
 
 
二、util.inherits(constructor, superConstructor)
 
    1、功能
 
         实现继承 可以通过.super_访问超类构造方法
 
    2、示例如下: //依次使用A方法和B方法
 


 
 
 
 
 
 
All rights reserved please indicate the source if reprint---吓尿了的大肥鼠
原文地址:https://www.cnblogs.com/realsoul/p/5511771.html