Why is the end of the F-35's jet nozzle 'spiky', is it like that to increase performance or some other factor?
Stealth. The F-35's nozzle is designed in that manner to reduce the IR and radar emissions from the aircraft (sometimes called Low Observable Axisymmetric Nozzle (LOAN)). From the press release which announced the test results:
GE Aircraft Engines' new LO Axi (Low Observable Axisymmetric) Exhaust System was successfully tested recently ... testing being conducted under the Joint Strike Fighter (JSF) Technology Maturation Program ...
According to GE,
... LO Axi Nozzle was installed by the South Dakota Air National Guard in an F-16C and ground-tested to verify installation compatibility with an operational aircraft system. Both infrared (IR) and radio frequency (RF) measurements were made by GE Aircraft Engines (GEAE) with the F110-GE-100 engine operating at power settings ranging from idle to maximum afterburner. The resulting test data verified that the LO Axi Nozzle achieves its installed signature goals during operation.
In addition to geometrical shaping and special materials for signature control, the LO Axi Nozzle also incorporates an ejector that enhances nozzle cooling.
The system was originally tested on a F-16. The following image shows the nozzle while it was under testing
Detailled rear view of a standard P&W F-100-200 still installed in the LOAN aircraft and the LOAN nozzle in the foreground (LMTAS photo); image from f-16.net