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

  • Home
  • SEARCH
  • 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 8247205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:45:57+00:00 2026-06-07T22:45:57+00:00

Why is name_Scenario[i] iterating each individual char instead of each string in the array?

  • 0

Why is name_Scenario[i] iterating each individual char instead of each string in the array?

var num_Scenarios;
var num_Features;
var name_Scenario = ["Login", "Users", "Yo", "Whatsup", "Diablo 3", "Junglr", "Microsoft", "Another", "Hi", "Anyone", "O", "Happy", "Stuff", "Sleep", "Account"];
var desc_Scenario;

function normalGrid() {
    $("#tile-bank").remove();
    $("#content").append("<div id=\"tile-bank\"></div>");
    //Code where your data is received and you run addScenario() per interation
    //filler global vars that your data will replace
    num_Scenarios = 15;
    num_Features = 20;
    name_Scenario = "Login";
    desc_Scenario = "This is a description.";
    var add_to = $("#tile-bank");
    for (var i = 0; i < num_Scenarios; i++) {
        addScenario(add_to, num_Features, name_Scenario[i], desc_Scenario);
    }
  • 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-07T22:45:58+00:00Added an answer on June 7, 2026 at 10:45 pm

    After name_Scenario = "Login"; line , name_Scenario is a string or ,in other words,an array of chars,and your are iterating through that chars. Just remove that line.

    for (var i = 0; i < name_Scenario.length; i++) {
    //changed 'num' to 'name'--^       ^---added '.length' here
        addScenario(add_to, num_Features, name_Scenario[i], desc_Scenario);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this example: var name; var id; var array = []; $.each(data, function(index,
Following scenario: I have user object: ... @Column(name = TITLE) private String title; @NotNull
Consider the following scenario:- A bookstore website has number of books and each book
Original Question Consider the following scenario: public abstract class Foo { public string Name
I have a 2D array that holds unique integers - this represents a physical
consider this scenario for validating: function validateForm (validCallback) { $('#first-name').add($('#last-name')).add($('#address')).each(function () { // validating
So the scenario is as follows: class Feline { String name; int age; equals(Object
Well, I'm so confused. I have made a json element like this: var world
string template = @ { argument1 = {0}; argument2 = {1}; }; When I
I used to create scenarios where in scenario name I explain what is scenario.

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.