www.webdeveloper.com
Results 1 to 2 of 2

Thread: Novice debugging issue

  1. #1
    Join Date
    May 2013
    Posts
    2

    Novice debugging issue

    Im brand new to javascript and as a seemingly easy first mini-project, Im trying to write a script that will turn an array into a string and present it in an alert box. Here is the script as it exists:


    var termDef = new Array();

    termDef [0] = <acronym><acronymTerm>;
    termDef [1] = term;
    termDef [2] = </acronymTerm><acronymDefinition>;
    termDef [3] = def;
    termDef [4] = </acronymDefinition></acronym>;

    var termDef = termDef.toString("");

    alert(tableRow);


    However, this script returns NOTHING and I cant seem to figure out where the bug is, or what Im doing wrong. Any help /guidance would be greatly appreciated.

  2. #2
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Quote Originally Posted by a1ineinthesand View Post
    I’m trying to write a script
    Then use a text editor not a word processor, which won't introduce illegal characters like “”, which should be ".

    Also learn to use the error console, which would have alerted you to the problem.
    Where used, return should be executed unconditionally and always as the last statement in the function.

    That's my signature, it's not part of the damn post!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles