Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

86
Visualizações
Reading the javascript object

I'm trying to write a script for an auto bet (bustabit.com)

they have a manual about this on github

I want to read the "bust" object in the engine.history for writing an if statement

but I have no idea how javascript objects work ( i have not any experience in programming much )

I tried this but it's not working

if (engine.history(game.bust)=1.37){log("bust is 1.37")};

can someone help?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The equal character is for assignment.

You should use == for equality checks read this

if (engine.history(game.bust)==1.37){log("bust is 1.37")};

Then

history(game.bust) means that history is a function which is taking a param which is is the value of the property bust inside the game object

Reading what are you sharing history has a method in it, which is going to cast the history to an array.

engine.history.toArray()

After that you can use array methods in order to find the history item you are looking for, for instance

const engineHistory = engine.history.toArray()
const element = engineHistory.find(historyItem => historyItem.bust == 1.37)
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda