Contemplations on Learning to Code: Arrays in arrays

Thing 1 and Thing 2

I write lists of phrases I want my kids to memorize.

An array is an ordered list
An object is a collection of key-value pairs
Functions take inputs and perform actions that result in outputs.

I think it’s cool that they’ll have these empty phrases floating around their heads that will one day be activated and they’ll say to themselves “Ohhhh shiiiiit, I know this.” I also teach them phrases that can direct replacement behaviors for things I don’t want them doing.

If my brother punches me, don’t punch him.
We can push, but not around corners.
Jiujitsu is okay if we don’t choke.

People who think priming isn’t real don’t drink Coca-Cola. Armed with these heuristics, when a fight breaks out from the kitchen into the living room like Piccolo and Goku vs Garlic Junior, and Andrés takes Immanouel’s back and slips an arm under Immanouel’s chin, and Andrés squeezes his arm thereby restricting Immanouel’s air ways — not quite a choke but definitely not comfortable — Andrés will say to himself “Jiujitsu is okay if we don’t choke.” Andrés will then release his older brother and they will stand and they will iterate.

var codingPhrases = [[“An”, “Array”, “Is”, “An”, “Ordered”, “List”], [“An”, “Object”, “Is”, “A”, “Collection”, “Of”, “Ordered”, “Pairs”], [“Functions”, “Take”, “Inputs”, “And”, “Perform”, “Actions”, “That”, “Result”, “In”, “Outputs”]];

var moralCompii = [[“If”, “My”, “Brother”, “Punches”, “Don’t”, “Punch”, “Him”], [“We”, “Can”, “Push”, “But”, “Not”, “Around”, “Corners”], [“Jiujitsu”, “Is”, “Okay”, “If”, “We”, “Don’t”, “Choke”]];

function raiseKids(arr){

for(i = 0; i <arr.length; i++){

for(j=0; j<arr[i].length; j++){

return arr[i][j];

console.log(“You’re doing your job, Dad.”)

};

};

};

raiseKids(codingPhrases);

raisekids(moralCompii);