Leds have polarity, that means they only allow current to flow in one direction. That means LED's are diodes.
While in resistors the relations of voltage to current is linear:
that is not the case for leds