How can I convert an integer string into Jacascript

Asked

Viewed 17 times

0

Hi Good afternoon I am learning to program in js I am actually quite new in the subject. I am trying to solve an exercise but the answer is not coming out right. I am not conseginto convrrter the answer. I believe I did everything right. Someone can help me?

Penalty system

Car Speed: Km Hour
    <div id="res">

    </div> 

    <script>

        function calcular(){
            var txtv = window.document.querySelector('Input#txtvel')
            var res = window.document.querySelector('div#res')
            var vel = parseInt(txtv.value)
            res.innerHTML=  'Sua velocidade é ${vel} Km Hora'

        }
    </script>
**bold text**
  • 1

    Why ${vel} run, you need to use string template (described in the above link in the blue box)

  • Jacascript ????

  • @Danizavtz javascript worsened?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.