Simple Javascript code not working in Google docs due to arrow function

前端 未结 2 2030
独厮守ぢ
独厮守ぢ 2021-01-29 10:29

I have tried implementing a piece of simple code as a script in google docs. It\'s function is validating ID numbers. The problem is that the syntax used for this code is too ad

2条回答
  •  离开以前
    2021-01-29 11:22

    Just replace the arrow function with a function:

    .reduce(function(counter, digit, i) {
    

提交回复
热议问题