MCPcopy Create free account
hub / github.com/appacademy/Module-1-Resources / iterateThroughWordBackwards

Function iterateThroughWordBackwards

w1/d2/loop.js:74–79  ·  view source on GitHub ↗
(word)

Source from the content-addressed store, hash-verified

72// iterateThroughWord('rhino');
73
74function iterateThroughWordBackwards(word) {
75 for (let i = word.length - 1; i >= 0; i--) {
76 let letter = word[i];
77 console.log("index", i, "value", letter);
78 }
79}
80
81iterateThroughWordBackwards("cats");
82/*

Callers 1

loop.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected