javascript - What does obfuscated code mean? -


this question has answer here:

so on site , peeking source code, , javascript code obfuscated(as usual). don't know obfuscated code normally, think this:

var1 > 10 / 2, var1 = 0 

is same as

if(var1 > 10 / 2){     var1 = 0; } 

is how is? if not, please tell.

you can see happen, when place code inside of parenthesis inside of console.log. need parenthesis, because console.log reads comma separator parameter.

comma operator:

the comma operator evaluates each of operands (from left right) and returns value of last operand.

var var1;  console.log(var1);                      // undefined  console.log((var1 > 10 / 2, var1 = 0)); // 0  console.log(var1);                      // 0


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - SSE Emitter : Manage timeouts and complete() -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -