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 3303394
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:57:09+00:00 2026-05-17T20:57:09+00:00

Ok basic JS 101 I know, but can’t find the answer… For the below

  • 0

Ok basic JS 101 I know, but can’t find the answer…

For the below code I have declared var mls_link = []; In globals

The data.getValue yields a string item (http addresses)
When I step through the code the string is an array rather than each “item” being a array entry.. ie mls_link [0] is h (the beginning of the http address) I want each element to be addressable as an http address so when I ask for mls_link[0] I get ‘http://someaddress.com’

for ( var i = 0; i < data.getNumberOfRows(); i++ )
        mls_link+=(data.getValue(i,1)); 

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-05-17T20:57:09+00:00Added an answer on May 17, 2026 at 8:57 pm

    In many implementations of Javascript, strings can be indexed like an array (however, as CMS correctly pointed out in the comments, the correct cross-browser way to do this, however, is by using String.charAt). ie:

    var s = "hello world";
    alert(s[6]); // "w"
    

    If you want to add a value to an array, use Array.push:

    mls_link.push(data.getValue(i, 1));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like it's basic Spring 101 stuff, but I can't seem to find
Basic question here - I have many lines of code that look something like:
Basic doubt...If QTP generates vbscript code as we record actions, can't we directly write
Basic question so I feel dumb but..., Whats the proper syntax below in the
This might sound very very basic 101 type question, but I really need help
This might seem like a basic question and back to Http protocol 101. But
I know C2DM seems to be messaged about to death, but I can not
Basic C# syntax question: So I have this class public class BrandQuery<T> : Query<T>
Basic question.. had to ask. Any help will be appreciated. Q: Why can't I
basic c++ question i'm fairly sure. if i have a base class with a

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.