I read that Ninja Secrets of JS Book and see this part of the sample code:
var ninja = { chirp: function signal(n) {
So, I understand the first part: we have a ninja object, and it has a method.
I understand the second part, which now approves a new object called samurai and has the chirp property.
The part that bothers me is ninja.chirp its part, what are we doing here? How it works?
user1899082
source share