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

124
Visualizações
Number is concatenated instead of adding it mathematically java script
let lst_val ;
let off_set = 0;
function genTicks(value, index, ticks)
{
   if (index == 0)
   {
      lst_val = ticks[0].value;
      off_set = (ticks[ticks.length - 1].value - ticks[0].value) / ticks.length;
      let gh = new Date(ticks[0].value);
      return gh.getDate() + " " + gh.getHours()+ ":" + gh.getMinutes()+ ":" + gh.getSeconds();
   }
   lst_val = lst_val + off_set;
   let gh = new Date((lst_val + (off_set*index)));
   console.log("tt: ",lst_val);
   return gh.getDate() + " " +gh.getHours()+ ":" + gh.getMinutes()+ ":" + gh.getSeconds();
}

output looks like thi

tt:  Sat Jan 01 2022 00:00:00 GMT+0500 (Pakistan Standard Time)9967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.333333334

I am trying to add two numbers. but is treating them as a number. Any fix for this.

Thanks in Advance.

about 4 years ago · Juan Pablo Isaza
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