今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: Loop through an array of information
(upbeat music) - [Instructor] Now that you know a bit about loops, it's time for a challenge. Given the 2D array you see on the screen here, loop through it and display all of the content, each array on a single line. So you can see that we have an array of the Teenage Mutant Ninja Turtles and certain attributes about them like their color of their bandana, their weapon, and a descriptor. Your goal is to output the array like what you see on the screen here where each turtle's name is in bold and then there is a comma separated list of their attributes. Don't worry about the last comma. That's perfectly okay. That said there are a few bonuses. The first is to trim the last comma in each list, apply keys to the attributes to make each one a little clearer and add the attributes to a bulleted list instead of a comma separated one. Now this isn't a graded challenge, but these are a few extra things to think about…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
Comparison operators and the truth4 分钟 26 秒
-
(已锁定)
Logical operators5 分钟 55 秒
-
(已锁定)
Creating if/else statements6 分钟 53 秒
-
(已锁定)
Conditional tags in WordPress1 分钟 19 秒
-
(已锁定)
Loops7 分钟 56 秒
-
(已锁定)
The Loop in WordPress2 分钟 54 秒
-
(已锁定)
Challenge: Loop through an array of information1 分钟 18 秒
-
(已锁定)
Solution: Loop through an array of information5 分钟 28 秒
-
-
-
-