I am trying to get load a variable from a array variable for my project but the value comes back as undefined I just used the console.log for the test output.
I want to learn how to use it after seeing others use on their projects and I want to do it to make my projects easier to manage.
I set it to trigger when the page loads up first thing.
Any help is welcome from the community.
My code if it helps solve it problem:
window.addEventListener('load',function(){
var values = [
odds_base = 10,
start_cash = 50
]
console.log(values.odds_base)
});
valuesis arrayvar values ={ odds_base :10, start_cash : 50 }console.log(odds_base)