Method Chaining?

Method Chaining?
0.0 0

#1

I know that I have chained methods together in the past but I tried it recently and got the error: “TypeError: str.split(…).charCodeAt is not function”

here is the code

 var charStr = str
                    .split("")
                    .charCodeAt();
  return charStr;

Just, what are the parameters for chaining methods in vanilla JS? Thanks!


#2

Split returns an array


#3

The problem is that split returns and array so you are trying to do charCodeAt on an array.