<script>
function makeid()
{
var text = "var text = document.write(lastNumber);";
var possible = "*+-/";
for( var i=0; i < 1; i++ )
document.write(lastNumber + possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
document.write(makeid(1))</script>
How do i make this to type for ex: 23* 45- 13/ and so on. What is wrong? It just show me 2 numbers and no char after.
that worked but i get "88undefined+ " what is undefinded and how do i delete it?
There are some problems with the code:
document.write
although it doesn't return anything.Also:
Just make the function return the string instead of returning code: