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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:30:08+00:00 2026-05-24T08:30:08+00:00

Intellisense pretty much stops working as soon as I call function meanValue I think

  • 0

Intellisense pretty much stops working as soon as I call function “meanValue”

I think I narrowed it down but I can’t quite figure it out. Apparently there is something wrong with the function “meanValue” because after I call it within another function, all forms of intellisense stop working…Here is my code. Intellisense doesnt work for everything inside function test after I call the meanValue function…

I have no clue the meanValue function seems fine to me??
//
EDIT: I’ve narrowed it down. Apparently any function where I have If(arr[0].length) type of syntax, it pretty much fails. One thing to note that is the functions run fine and debug fine but for some reason intellisense doesnt like this.

Anyone know what another way to check if something is defined or not? I want to check to see what kind of array I am looking at, if its a multidimensional array or not.

Thanks!!!
//

<script language="javascript" type="text/javascript">

    function meanValue(arr) {
        var mean;
        var sum = 0;

        if (arr[0].length) {
            for (var j = 0; j < arr[0].length; j++) {
                sum += arr[0][j];
            }
            mean = (sum) / arr[0].length;

        }
        else {
            for (var i = 0; i < arr.length; i++) {
                sum += arr[i];
            }
            mean = (sum) / arr.length;


        }
        return mean;
    }

    function test(a, b) {
        var testing = 5;
        var oranges = meanValue(a);

     }
     var a = [1, 3, 4];
     var b = [4, 5, 6];

</script>
  • 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-24T08:30:09+00:00Added an answer on May 24, 2026 at 8:30 am

    I was able to reproduce the issue in my Netbeans.

    The problem seems to stem from a mixing of two languages in one file for certain IDEs. (Is this a .php file with some Javascript in it?)

    For some reason, the IDE intellisense engine is trying to parse the less-than (<) symbol in that chunk of code as if it were trying to validate XML, which Javascript isn’t. So, of course, it’s failing.

    Try wrapping that code in [CDATA — it should resolve the issue.

    So the example above, modified, would be:

    <script language="javascript" type="text/javascript">
    //<![CDATA[ 
        function meanValue(arr) {
            var mean;
            var sum = 0;
    
            if (arr[0].length) {
                for (var j = 0 ; j < arr[0].length ; j++) 
                {
                    sum += arr[0][j];
                }
    
                mean = (sum) / arr[0].length;
            }
            else 
            {
                for (var i = 0; i < arr.length; i++) {
                    sum += arr[i];
                }
                mean = (sum) / arr.length;
            }
            return mean;
        }
    
        function test(a, b) {
            var testing = 5;
            var oranges = meanValue(a);
        }
    
        var a = [1, 3, 4];
        var b = [4, 5, 6];
    //]]>
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Intellisense popup in VS2010 is driving me crazy. I can only see 9 items
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Is there an equivalent to 'intellisense' for Python? Perhaps i shouldn't admit it but
I have a pretty annoying problem with the IntelliSense in Visual Studio 2010: Every
I love vim, but not having things like IntelliSense/Code completion from Eclipse makes it
I've found tooltips displayed by Intellisense when keying method name as very usefull but
I'm writing my custom events in C++/CLI (I pretty much only care about the
I'm pretty sure that many people have thought of this, but for some reason
I'm pretty sure I know the answer but I'm wondering if there's a way
Well, the eBay SDK has a pretty nice selection of examples, but they are

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.