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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:05:07+00:00 2026-05-28T03:05:07+00:00

I currently have a function that runs around 200 times. The function look like

  • 0

I currently have a function that runs around 200 times.

The function look like this:

function GetB(av,bol){
var bxes=[
["11","12","13","21","22","23","31","32","33"],
["14","15","16","24","25","26","34","35","36"],
["17","18","19","27","28","29","37","38","39"],
["41","42","43","51","52","53","61","62","63"],
["44","45","46","54","55","56","64","65","66"],
["47","48","49","57","58","59","67","68","69"],
["71","72","73","81","82","83","91","92","93"],
["74","75","76","84","85","86","94","95","96"],
["77","78","79","87","88","89","97","98","99"]
];

//code
}

My first concern is that this array is slowing down everything because I think it is rewriting each time the array bxes (or something like that)

This bxes array is never modified and I wouldn’t mind to make it a global.

  • Do I need to worry about the rewriting thing? (or do browsers keep
    track if it was ever modified, and if it wasn’t it won’t rewrite it)
  • 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-28T03:05:07+00:00Added an answer on May 28, 2026 at 3:05 am

    Why wouldn’t you move it outside the function? (Why risk it causing a performance issue?)

    It wouldn’t necessarily even have to be “global” – just in a parent scope of the function – but both the function and bxes and other code could exist in a parent function or closure…

    (function(){
      var bxes = [...];
      window.GetB = function(av,bol){...};
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a function that grabs the browser windows uri, parses out the
I currently have a Javascript function that uses a string to reference an object
How would I create a nested list, I currently have this public function getNav($cat,$subcat){
I currently have the following js code function clearMulti(option) { var i; var select
TLDR I have a function that runs on the end of a pan in
Update Added jsfiddle - see bottom of post I currently have a function that
I currently have a Python 2.6 piece of code that runs two loops simultaneously.
We currently have an automated system that runs as a service for processing satellite
I have a funciton that I am currently using to show a hidden div.a_type
So I have function that formats a date to coerce to given enum DateType{CURRENT,

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.