Why appenditem?

One of my students asked me about this, and I can’t figure it out. Why does your APCSP environment use appenditem(list,a) instead of standard Javascript list.push(a)? I’m guessing you had a reason, yes? Thanks, jr

I’m guessing its to mimic the command they will see on the AP CSP exam which uses AP CSP Pseudocode

The APCSP uses append(). So maybe? But there are other dissimilarities between code.org Javascript and APCSP pseudocode, so I would guess not.

Code.org added a lot of functions that aren’t very useful. They also have timedLoop which is a copy of setInterval but with small changes in the way you use them. Sometimes they’re a little bit better and have some more ways you can use them in. I don’t know about appendItem.

appendItem() doesn’t require a discussion about using methods on objects.

3 Likes

This is frustrating because kids are trying to go to other environments to write programs and those commands don’t work. I have students who enjoy repl.it and are finding that the code doesn’t work there.

@pitchernikki I understand that can be frustrating. Have you spoken with them about this? Maybe ask them how the constructs in App Lab helped them learn principles of programming that they are now able to apply elsewhere? I feel like being transparent with them about the crawl → walk → run pathway might help them realize why it’s set up this way.

–Michael K.

1 Like