Js Remove Object From Array Javascript Length Function In C