Jquery: getting ${text} in the list instead of input value using -> $('#list').prepend($('<li>${text}</li>'))

$(()=>{

$(’#btn’).click(()=>{
let text=$(’#in’).val()
$(’#list’).prepend($(’

  • ${text}
  • ’))
    })

    })

    use this, $(’#list’).prepend( ` ${text} ` )
    backticks is used here, ${} is used to expand variable when used with backticks