• Just working on a logger function that does not have to take care about the count of parameter. Something like this and like to use the spread syntax:

    var logger = funktion(...params){
          console.log.apply(null, params);

    What do you think?

  • It has been asked before, but it's not high up my priority list as I feel like it doesn't actually add much, and might be a pain to implement.

    JS has a built-in arguments variable:

    var logger = function(){
          console.log.apply(null, arguments);

    should work on Espruino just fine - no need for spread at all :)

  • Great, so let's use arguments.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Is it planed to have Spread syntax (...) ? No, use arguments instead

Posted by Avatar for MaBe @MaBe