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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:53:55+00:00 2026-05-13T18:53:55+00:00

So.. I am passing data to a function that handles strings and numbers differently.

  • 0

So..

I am passing data to a function that handles strings and numbers differently.

I would LIKE to be able to pass an array of values and detect what the types of each value is.

row[0] = 23;
row[1] = "this is a string... look at it be a string!";
row[2] = true;

$.each(row, function(){
  alert(typeof(this));
  //alerts object
});

Is it possible to detect the “actual” datatypes in a given row?

  • 1 1 Answer
  • 1 View
  • 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-13T18:53:56+00:00Added an answer on May 13, 2026 at 6:53 pm

    Try

    var row = [ 23, "this is a string", true ];
    
    $.each(row, function (index,item) {
        alert(typeof(item));
    });
    
    // Alerts "number", "string", "boolean"
    

    Whenever possible I try to avoid using “this” in callbacks and using explicit arguments is usually clearer and more predictable.

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

Sidebar

Related Questions

I am encountering a problem with passing data between pages that require facebook access.
I'm building a simple aggregator-type app that would pull in data from multiple websites
I have a spreadsheet of data I am parsing using openpyxl's iter_rows function. However
I'm passing data between my controller and my view using a ViewModel class. When
My question is about passing data from kernel to a user space program. I
I am having trouble passing data read from a text file to another class
I am having troubles passing data from the controller to the model in opencart(1.5.3).
What's the rule of thumb for passing data in a REST URL in the
i have already finished code to passing data to url , and it did
I have a problem when passing data in .getJSON. The reason for this is

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.