MediaWiki:Common.js: Difference between revisions

From jugglingpatterns
No edit summary
No edit summary
Line 1: Line 1:

import Siteswap from "/js/siteswap.mjs";
import Siteswap from "/js/siteswap.mjs";

var siteswapnr = "531";
var siteswapnr = "531";
console.log("siteswapnr " + siteswapnr);
console.log("siteswapnr " + siteswapnr);

Revision as of 10:56, 15 November 2023

import Siteswap from "/js/siteswap.mjs";

var siteswapnr = "531";
console.log("siteswapnr " + siteswapnr);
var sw=new Siteswap(siteswapnr);
var myjson = {jugglers:2, limbs:"ABCD"};
console.log(JSON.stringify(sw));
myjson.props=Array.apply(null, Array(sw.nProps)).map(function () {return {}})
var jif=sw.toJif(myjson);
console.log(JSON.stringify(jif));