The length of the runway plays a part if you want a functional F-35B.
Sure it could take off with no payload in maybe 180-190m, or with almost no fuel in say ~150m. But they are also narrow ships so landing would also be interesting. I do doubt it would be able to do all the harrier tricks as nicely as there is less directional control. I also doubt the F-35b will be able to take off from container ships, helicopter decks etc.
The container ship experiment showed it doesn't work. You need to have the ship specially designed to handle the aircraft.
The F-35B is over 20 Tons. Twice the weight of a Harrier. Its also a bit larger than a harrier.
Lifts, deck, structure, hanger, etc will all have to be designed with this in mind. Also to note every country looking at replacing the harrier with the F-35B is building new ships to take the new aircraft.
What the hell is either country going to do with a carrier anyway? There are so many disputed territories that are stones throw away from large military air bases. None have territorial claims afar, neither participates significantly in UN peace keeping forces where such a force is required, both fall under the US umbrella. The thing would be a magnet for North Korean and Chinese missiles and subs anyway.
This is as nuts as Israel getting a carrier.