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

686
Visualizações
How can I get 'return True' by exponent in JavaScript?

First, I'm sorry I can't speak English well.

I have some problems studying JS. I want to return true if the string is a Number.

If string is "0x10", "0b10", "9843" it work well (all return true). And string like "a463" return false well.

But, when the string is a string with an exponent like "1e43"... it doesn't work well. (it's return false) I want to return true when string with exponent.

if (isNaN(s - 0)) {
  return false;
} else {
  return true;
}

I think have a problem with if().

So, How can I get return true, when the string is with exponent, like "1e22", "13e7"?

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