As @allObjects says, I think this is specific to whatever SPI device you have. Usually, it works as follows:
var data = SPI.send([command, 0xFF], csPin);
result = data[1];
So you send a command, then a 'no-op' byte (usually 0xFF or 0x00). Two bytes are returned - the first is useless, but the second will be the result of the SPI command.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As @allObjects says, I think this is specific to whatever SPI device you have. Usually, it works as follows:
So you send a command, then a 'no-op' byte (usually 0xFF or 0x00). Two bytes are returned - the first is useless, but the second will be the result of the SPI command.