Skip to content

Commit 283f9db

Browse files
committed
KindnessSelections
1 parent f4722d9 commit 283f9db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

objects-and-math/chapter-examples/ForInLoop.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ let tortoiseOne = {
55
age: 85,
66
diet: ["pumpkins", "lettuce", "cabbage"]
77
};
8-
8+
console.log(tortoiseOne)
9+
for (item in tortoiseOne){
10+
console.log(item + " is: " + tortoiseOne[item])
11+
}
912
// Using a for..in loop, iterate through each property in the tortoiseOne object and print the value to the console.

objects-and-math/chapter-examples/KindnessSelection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ function randomSelection(arr){
99

1010
for (i=0; i < 8; i++){
1111
console.log(randomSelection(happiness));
12+
//console.log(randomSelection(words))
1213
}
1314

1415
//Experiment with the code above. Try to:

0 commit comments

Comments
 (0)