Jump to content

Search the Community

Showing results for tags 'javascript variables'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Within script tags in the body of my HTML, I have: aRay = new Array(); aRay[0] = 'a'; aRay[1] = 'b'; aRay[2] = 'c'; aRay[3] = 'd'; aRay[4] = 'e'; document.write("aRay length is "+aRay.length+"</br>"); for( i = 0; i < aRay.length; i++ ) document.write("element "+i+" is "+aRay[i]+"</br>"); for( y = 0; y < aRay.length; y++ ) { if(aRay[y]='d') document.write("so we can find ""+aRay[y]+"" in element "+y+"</br>"); break; endif; } And what prints out is: aRay length is 5 element 0 is a element 1 is b element 2 is c element 3 is d element 4 is e so we can find "d" in element 0 That 0 at the end of the line above should be a 3. Why isn't it? What am I missing here?
×
×
  • Create New...