课程: JavaScript Practice: String Manipulation
Solution: Display a page heading in uppercase - JavaScript教程
课程: JavaScript Practice: String Manipulation
Solution: Display a page heading in uppercase
- [Instructor] In this challenge, we're building a website and our design colleagues would like us to make sure that one of the page headings is displayed in all uppercase letters. In my experience, this is a common situation to use the string method toUpperCase. You may notice that there are a lot of parallels between toUpperCase and toLowerCase. So let's go ahead and get started on this challenge because I have a feeling that you may get this one pretty quickly. So on line 10, we have the function transformPageHeading and we're going to get started on line 12 with our return statement and then heading. Here, to use toUpperCase, we just need to apply the string method toUpperCase, Similarly to toLowerCase, we want to make sure that toUpperCase is in camel case. It also does not take any arguments, so let's go ahead and run this one, and excellent. You can see MY SUPER COOL WEBSITE in all caps, amazing work.
内容
-
-
-
Solution: Determine password length2 分钟 36 秒
-
Solution: Trim a user's new password2 分钟 8 秒
-
Solution: Check phone number format1 分钟 54 秒
-
Solution: Transform user input to lowercase1 分钟 39 秒
-
Solution: Display a page heading in uppercase1 分钟 3 秒
-
Solution: Does the message include "fun"?2 分钟 15 秒
-
Solution: Split your email list2 分钟 8 秒
-
Solution: Slice your account number display1 分钟 59 秒
-
Solution: Replace the typo1 分钟 44 秒
-
Solution: Concat first and last name2 分钟 21 秒
-
-