The show function is on FavoriteFlavor.chooseEmoticonState.prototype, not FavoriteFlavor.chooseEmoticonState, so you could call it with:
FavoriteFlavor.chooseEmoticonState.prototype.show();
But given that it's on a prototype, it doesn't really make a lot of sense to call it directly.
What would make sense is to call it on an instance of chooseEmoticonState:
// assume chooseState has been instantiated with
// new FavoriteFlavor.chooseEmoticonState();
chooseState.show();
Or if show() isn't intended to be an instance method, put it directly on FavoriteFlavor.chooseEmoticonState:
FavoriteFlavor.chooseEmoticonState = {
show: function() {
}
};
and then you can call it in the fashion you were trying to before:
FavoriteFlavor.choseEmoticonState.show();
prototypeor are you allow to use a different pattern of javascript??