Javascript nit working in Firefox,chrome,opera but works in IE

0 Jon L · July 8, 2015
<!DOCTYPE html>
<html>
<head>
    <title> Epic! </title>
</head>
<body>
<script type="text/javascript">

var name = new Array("jon","cody","molly");
name.sort();
for (j=0;j<name.length;j++){
document.write(name[j] + "<br>");
}


</script>
</body>
</html>

Post a Reply

Replies

Oldest  Newest  Rating
0 Amin Hasan · July 9, 2015
Remove the "name.sort();" and will works fine.
  • 1

Javascript

107,337 followers
About

A scripting language that is added to standard HTML to create interactive effects, apps, games for the browser.

Links
Moderators