SoC: JavaScript implementation