educative.io

Educative

About Delete operation's time complexity in javascript

In the course it says delete operation on an array cost O(n), but in javascript all delete does is mark the indexed location to be undefined, and not array shifting is done. So isn’t that just O(1)?