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方法
 


 
 
 
 
 
 
posted @ 2016-05-20 13:24  DeadGhost  阅读(215)  评论(0编辑  收藏  举报