Vistex interview question

calculate speed using html and javascript.