Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8734435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:50:26+00:00 2026-06-13T09:50:26+00:00

I not sure how to do this, but I am trying to debug some

  • 0

I not sure how to do this, but I am trying to debug some JS values with console.log:

 function SetAPIValue(key1, value1, scormVersion, methodCalled) {
/* key1 value sometimes contains the value true or false and dont want to store these! */
    if (key1 == true || key1 == false) { }
    else
    {
        /* value1 comes back with two values for cmi.suspend_data, then 3, then 4 all in one string seperated by a ';'! */
      setValuesArray.push({
       key: key1,
       value: value1
     });

   for (var i = setValuesArray.length - 1; i >= 0; i--) {
   var array = setValuesArray[i];
   console.log(setValuesArray);
   if (array.key == key1) {
     if (key1 = "cmi.suspend_data") {
       if (value1.indexOf(";") > 0)
       {
         valueArray[j] = value1.split(";");
         alert(valueArray[j]);
         //alert("key1 is" + key1 + "and is returning " + setValuesArray[j-1].value);
         return valueArray[j];
        }
       }
       else
         return setValuesArray[i].value;
       } 
    }
  }
  return "";
}

i am trying to see what is in console.log(setValuesArray). Whne i run my app in IE9 I have F12 developer tools enabled, I click on the console tab, and all I get there is:

LOG: [object Object]
LOG: [object Object],[object Object]
LOG: [object Object],[object Object]
LOG: [object Object],[object Object],[object Object]

I dont understand? how can I see the values in setValuesArray?
I do not have firebug-lite installed. I work in win 7 64bit
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:50:27+00:00Added an answer on June 13, 2026 at 9:50 am

    I think that using console.log is the better way to go (when compared to using alerts).

    However, keep in mind that it both console.log() and alert() will show the string representation of the input param and for JS objects that’s “[object Object]”.

    What I can recommend is to stick to the idea of using console.log(), but you might want to take a look at this article if you wish to be able to have this working in older browsers (prior versions of IE in most cases):
    http://patik.com/blog/complete-cross-browser-console-log/

    Also, when you wish to print a string depicting the contents of a JS object, you can use JSON.stringify().
    Since, of the Internet Explorers, only 7 is the one that doesn’t have native support for the JSON objecт. But you can easily get around that by including the json2.js library to your page – the code is available in the GitHub repository here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to debug this problem but not sure where exactly i need to
I am trying to add some logic in this. But I am not sure
I'm not sure how to describe this but I'm trying to create a base
I'm not even sure what this is called? But I'm trying to learn what
Not sure if I can explain this correctly, but I am trying to execute
I'm not sure exactly where this is happening, but what I'm trying to do
I'm trying to to use this class http://robbyonrails.com/articles/2005/05/11/parsing-a-rss-feed but am not sure where to
Hi not sure if this is the right forum for this but does anyone
I'm not sure if this possible but probably is fairly simple. I've made a
I'm not sure how difficult this but I have an array and would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.