Help with Elyses Enchantments

HI there!
I was a skilled programmer that didn’t program high-Level languages for ages.

Today I tried to program the exercise above and was not capable of solving it
Below code is for testing the removeItemAtBottom function in Elyses Enchantments problem. But, It’s seems to be not working expectedly. Because Task 5, remove_item_from_top!(stack)
and Task 7, remove_item_at_bottom!(stack) are not working
In the beginning I was not shure what top or bottom in the example was, as the uppermost card in the hand seems to be bottom and the one next to the palm seems to be first after some thaughts about that (and test runs).

it worked neither with (the hint-section suggests this:)

function remove_item_at_bottom!(stack)
popfirst!(stack)
end

function remove_item_from_top!(stack)
pop!(stack)
end

ERROR:
Code Run

Test Failed
Expression: remove_item_from_top!(stack) ==
Evaluated: 1 == Any

Test Failure

Test Failed at ./runtests.jl:107
Expression: remove_item_from_top!(stack) ==
Evaluated: 1 == Any

(according output in remove_item_at_bottom!(stack))

nor with

function remove_item_at_bottom!(stack)
pop!(stack)
end

function remove_item_from_top!(stack)
popfirst!(stack)
end

ERROR:
Test Failed
Expression: remove_item_from_top!(stack) ==
Evaluated: 1 == Any

could there be a mistake or did I get something completely wrong?
I also found this discussion and
for me it looks as if the reference is done by reference (where the original is modified)

Code issue

stack = [3, 2, 6, 4, 8];
remove_item_from_top!(stack)

thanks for answers in advance

Hubert

Is this javascript or julia?

The instructions:

5. Remove the top card from the stack

Make a card disappear by removing the card at the top of the stack.
Return the adjusted stack.

What does popfirst! return?

thanks for the quick reaction:

julia

@show stack

the last element of the array has been deleted

Is that what the instructions says this function should return?

that’s the question
in the beginning I thought top and bottom are meant according to FIFO-Practice
but in relation to the hand the order seems to be the other way round.

AND: after changing logics to do the push and pop in opposite order it also didn’t work.
That’s why I think there’s an ERROR!

today I’m tired and after hours of mind work not able to think any further about this
so I will give it another look tomorrow.

thanks for your answers so far!

That is a side effect of popfirst! but it’s not what it returns.