One, arrow function
General function 1
var function (A, b) { return a + b;}
General function 2
function Add (A, b) { return a + b; }
Arrow functions
var add = (A, b) = + A + b;
If there is only one return value inside the function, you do not have to write a return, and if you execute more statements inside it, enclose it in {}.
var add = (A, b) = = { Console.log ("This is the arrow function"); return A + b;} Console.log (Add (10, 11));
Note the point:
Second, the Buffer object
The buffer operation is memory, it is actually to request a piece of memory, used to store data, new Buffer (n) is to request an n bytes of memory.
The requested bytes are printed out and may not be empty, so you can use Buffer.fill (0) to clear the data, which is represented by the 16 binary.
// Strict mode "use strict"new Buffer (5); // Empty Memory buffer.fill (0); console.log (buffer);
You can also write it directly.
New Buffer ("Hello World");
Arrow functions and Buffer objects