You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
///// LOOPING THROUGH AN OBJECT USING OBJECT.KEYS ////////////////////////////////////////////////////
constmySecondObject={
hat: "baseball cap",
shirt: "long sleeves",
pants: "jeans",
}
Object.keys(mySecondObject)
// for (let{variable of declaration} character{temporary variable that is redeclared EVERY time through the loop} of string{iterable object we want to iterate through})
// so we'll iterate through every character of string one by one and set each character equal to the temporary variable "character".
// we then take that character and add it on to the start of the string reversed
// then after the entire for loop, we return reversed
functiontester(string){
letreversed='';// string that will be assembled over time