Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=If-Else+Example+3+-+15487471
widthauto

Excerpt
Sometimes you need to know what number (index) you are on while looping through an array.
In those cases you would use this method.
Code Block
fruit = "Cranberry|Grape|Grapefruit|Kiwifruit|Lemon|Lime|Mango|Orange";

for(int x = 0; x < size(fruit); x++) {
    runnerLog(fruit[x]);
}
Info
number monthNumber = month(currentDate());
string monthName = formatDate(currentDate(), "MMMM");

if(startsWith(monthName, "J") == true) {
   runnerLog("Example 3: This month " + monthName + " starts with the letter 'J'.");
}