The JavaScript language implements similar effects: 3.grams.flour
Reference javascript:the good Parts, 33rd page
The code is as follows:
<body>
<script type= "Text/javascript" >
Copied from page javascript:the good Parts
Function.prototype.method = function (name, func)
{
This.prototype[name] = func;
return this;
}
Number.method (' Chi ', function () {
return this*0.333;
});
Document.writeln ((3). Chi ());
Document.writeln ("<br>");
Document.writeln ((3+1). Chi ());
Document.writeln ("<br>");
Document.writeln (3.2.chi ());
Document.writeln ("<br>");
Document.writeln (3.0.chi ());
Document.writeln (3.chi ());
Syntaxerror:identifier starts immediately after numeric literal
</script>
</body>
The results of the operation are as follows:
0.9990000000000001
1.332
1.0656
0.9990000000000001
Study hard, Kuzhongzuoyue.
The JavaScript language implements similar effects: 3.grams.flour