Jump to content

[SOLVED] function not running


soycharliente

Recommended Posts

Can someone tell me what's wrong with this code?

<html>
<head>
<title>Untitled Document</title>
<script language="text/javascript">
function repeatword() {
	var string;
	for (var i = 0; i < 100; i++) {
		string += "hello ";
	}
	return string;
}
</script>
</head>
<body>
<script language="text/javascript"> document.write(repeatword()); </script>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/57090-solved-function-not-running/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.