shantismurf

joined 2 years ago
[–] shantismurf@lemmy.world 1 points 2 weeks ago

I do this regularly now.

[–] shantismurf@lemmy.world 3 points 2 weeks ago

Irfanview is always the answer!

[–] shantismurf@lemmy.world 5 points 2 weeks ago (7 children)

I know a bunch about computers and that doesn't add up to me either!! I hate the webp format.

 

I'm trying to use the probability evaluation to look for a value in an array and only select that item if the value is found. I'm running into an issue creating the variable of the array.

['airport','train station','bus stop'].indexOf('airport') 

returns a positive 1 but

travelarray = ['airport','train station','bus stop']
travelarray.indexOf('airport') 

returns -1

Ultimately, I'd have a list like this:

situation 
  generic situation
  something that applies to airport location^[travelarray.indexOf(location) >= 0 ? 100 : 0]
  something that applies to bus station location^[travelarray.indexOf(location) >= 0 ? 100 : 0]

So, first, how do I create a variable array in perchance?

Second, is my if statement for the probability evaluation correct? There will be multiple items that fit each location, and I want generic situations to also be eligible regardless of location.

Thanks!