I learned about JavaScript type coercion and typeOf operators today, among other things. Fun stuff!
Floating point math seems strange, but I'm sure it'll come together as I learn more.
Here's some code I wrote for an assignment:
Floating point math seems strange, but I'm sure it'll come together as I learn more.
Here's some code I wrote for an assignment:
// Challenge continued // Declare a variable favFoodType. Using the typeof operator, assign it the value of favFood’s data type. // Declare a variable timesEatenType. Using the typeof operator, assign it the value of timesEaten’s data type. // Declare a variable eatAgainType. Using the typeof operator, assign it the value of eatAgain’s data type. // Declare a variable ripeProgressionArray. Using the Array.isArray() method, assign it the value of determining if ripeProgression is an array. const favFood = "Avocados"; const timesEaten = 1298; const eatAgain = true; const ripeProgression = ["hard", "soft"]; //Add code here const favFoodType = typeof favFood; const timesEatenType = typeof timesEaten; const eatAgainType = typeof eatAgain; const ripeProgressionArray = Array.isArray(ripeProgression);