wasm-bindgen/tests/wasm/variadic.js

14 lines
269 B
JavaScript
Raw Normal View History

const wasm = require('wasm-bindgen-test.js');
const assert = require('assert');
2018-08-19 15:39:16 +03:00
function variadic_sum() {
let answer = 0;
for(var i=0; i<arguments.length; i++) {
answer += arguments[i];
}
return answer;
}
exports.variadic_sum = variadic_sum;