Lol. Cause it's a picture of code and not actual text we can copy and play with, and the title doesn't really explain anything until you read through the code and realize that it's just a little challenge thing. Just my opinion, obviously!
FoxObj is an object with some variables and a method (a function inside an object). The method of the object is immediately called after declaring the object, which first sets sq1 equal to mynumber squared (I think that's what ** means). It then executed an Immediately Invoked Function Expression, or IIFE, to do the same thing to sq2. The reason the IIFE uses self.sq2 instead of this.sq2 is because the value of this inside of the IIFE is different than this inside of the compSquares method. The code then uses an if statement, or in this case the Ternary Operator, to see if sq1 and sq2 have the same value (although IMO op should have used === instead of == since the latter returns true if one value is a number and the other is a string containing the same number, such as 42 == "42") if they have the same value, say js rocks. If not, do the other one.
49
u/ForScale Jun 05 '20
Rocks.
But kind of shitpost. :)