mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-01 06:46:20 +03:00
14 lines
269 B
JavaScript
14 lines
269 B
JavaScript
const wasm = require('wasm-bindgen-test.js');
|
|
const assert = require('assert');
|
|
|
|
function variadic_sum() {
|
|
let answer = 0;
|
|
for(var i=0; i<arguments.length; i++) {
|
|
answer += arguments[i];
|
|
}
|
|
return answer;
|
|
}
|
|
|
|
exports.variadic_sum = variadic_sum;
|
|
|