5/3/2023 0 Comments Is java the same as javascript![]() ![]() convert x and y into numbers if they are not already use the "+" trick If(typeof y = "object") y = toPrimitive(y) ![]() If(typeof x = "object") x = toPrimitive(x) If(xIsNothing || yIsNothing) return (xIsNothing & yIsNothing) Var yIsNothing = (x = undefined) || (x = null) Var xIsNothing = (y = undefined) || (y = null) If(typeof y = "function" || typeof x = "function") return false notice the function only uses "strict" operators ![]() To show you what I mean here is a JavaScript function that behaves exactly like =: // loseEqual() behaves just like `=` = is the same things as =, except that = does type conversion ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |