Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,20 @@
/* Introspection, in jsish */
if (Info.version() < Util.verConvert('2.8.6')) {
puts("need at least version 2.8.6 of jsish for this application");
exit(1);
}
/* Check for "abs()" as function and "bloop" as defined value, call if both check true */
if ((bloop != undefined) && (typeof Math.abs == 'function')) {
puts(Math.abs(bloop));
}
/* ECMAScript, this will sum all numeric values, not just strict integers */
var nums = 0, sums = 0, v;
for (v of Info.vars(this)) {
if (isFinite(this[v])) {
nums++;
sums += this[v];
}
}
printf("%d numerics with sum of: %d\n", nums, sums);