“method” method in Crockford's book: [removed] The Good Parts

前端 未结 5 1651
不知归路
不知归路 2020-12-04 17:13

Douglas Crockford wrote in his book (Page 4):

Throughout the book, a method method is used to define new methods, This is its definition:



        
5条回答
  •  余生分开走
    2020-12-04 17:32

    Try to use this prototype method:

    String.prototype.deentityify = function () { ... }
    

    Then:

    document.writeln('<">'.deentityify( ));
    

    We can see: <">

提交回复
热议问题