first working javascript code generator