In javascript, the number type is just number. To truly bit shift with this method, you'd need to convert the bitwise representation into a number, perform the given operation, handle the corner case of odd numbers when dividing, and the convert it back into some representation of bits.
Trying to judge people with questions like this seems like a misguided endeavor. Yes, it's probably valuable to know that bitshifting is roughly equivalent to *2 and /2. But that's more like trivia - the chances you'll actually use that in real life is really low. I've had to work with people that think bitshifting is an appropriate optimization for division/multiplication by even numbers. I then have to explain overflows, underflows, and the fact that the compiler will compile it to shifts if appropriate anyway, so don't sacrifice readability in the name of micro-optimization.
Trying to judge people with questions like this seems like a misguided endeavor. Yes, it's probably valuable to know that bitshifting is roughly equivalent to *2 and /2. But that's more like trivia - the chances you'll actually use that in real life is really low. I've had to work with people that think bitshifting is an appropriate optimization for division/multiplication by even numbers. I then have to explain overflows, underflows, and the fact that the compiler will compile it to shifts if appropriate anyway, so don't sacrifice readability in the name of micro-optimization.