Skip to content
Akin C edited this page Apr 15, 2018 · 15 revisions

Welcome to the Javascript-output-code-as-string- wiki!

This repository is part of a larger project!

◀️ PREVIOUS PROJECT| NEXT PROJECT ▶️


Javascript´s method ToString allows the developer to get the code of a function as a string. Like the following example should show:

function myCode()
{
	console.log("Hello World!");
}

myCode.toString();

//Output should look like this without /* and */:
/*
"function myCode()
{
	console.log("Hello World!");
}"
*/

It seems there is no defined standard by ECMAScript for the output result of a function as string with the ToString method.

STILL IN WORK!

Clone this wiki locally