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.

2 Likes