Log keypress to console JS

I have this jQuery code:

$(`#searchbar`).on(`keyup`, function(){
      var value = $(this).val()
      console.log("Value:", value)
})

Which logs the text in the input in the console.

For example if you write test the console will look like this:

Value: t
Value: te
Value: tes
Value: test

Is this possible to do with just pure JS, no jQuery?