JE and JZ are just different names for exactly the same thing: a conditional jump when ZF (the “zero” flag) is equal to 1.
(Similarly, JNE and JNZ are just different names for a conditional jump when ZF is equal to 0.)
You could use them interchangeably, but you should use them depending on what you are doing:
JZ/JNZare more appropriate when you are explicitly testing for something being equal to zero:dec ecx jz counter_is_now_zeroJEandJNEare more appropriate after aCMPinstruction:cmp edx, 42 je the_answer_is_42(ACMPinstruction performs a subtraction, and throws the value of the result away, while keeping the flags; which is why you getZF=1when the operands are equal andZF=0when they’re not.)