Como posso verificar se uma string é um float?
Eu estou passando em um parâmetro chamado valor. Eu gostaria de saber se o valor é um float. Até agora, tenho o seguinte:
if (!isNaN(value))
{
alert('this is a numeric value but not sure if it is a float.');
}
Como eu vou um passo além e converto a string em algo que pode ser avaliado como float?