Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
Insert in combined array creates empty rows??
see my code 7zottenARR. My attempt to insert on position 14 of the combined array results in a few empty rows at the end of the array followed by the last 2 fields. Why does this happen? tnx https://code.sololearn.com/cm80kWDg4gcp/?ref=app
2 Antworten
+ 1
I've changed the "puts" in the end to "print" so this is how your array really looks like:
[[7, "zotten", "zwommen", 7, "zonnige", "zondagen", "zonder", "zwarte"], ["zwembroek", "ze", "zijn", "ZOT", "zei", "Zulma"], "ze", "zullen", "ziek", "zijn"]
You have:
pos 0 nested array
pos 1 nested array
pos 2-5 strings
Is that what you aimed for?
0
print would have immediately visualized what I overlooked: the nested arrays and pos counting... thanks a lot!