1 00:00:00,731 --> 00:00:01,240 How'd it go? 2 00:00:02,530 --> 00:00:05,400 I'll share one possible solution for the challenge. 3 00:00:05,400 --> 00:00:08,890 But keep in mind, there are many methods and potential solutions. 4 00:00:10,210 --> 00:00:13,210 If you didn't get it, I'll give you a hint. 5 00:00:13,210 --> 00:00:16,840 If you did, here's a chance to see if we have the same solution. 6 00:00:19,200 --> 00:00:22,310 First, trim down the white space around the string. 7 00:00:23,880 --> 00:00:27,270 You'll need to replace the space between the names with an underscore. 8 00:00:28,910 --> 00:00:31,840 Make sure all of the characters are lowercase. 9 00:00:33,490 --> 00:00:37,320 Now, you can pause here and give it a try, or follow along. 10 00:00:39,430 --> 00:00:42,174 First, to remove the white spaces, 11 00:00:42,174 --> 00:00:46,696 I'll set the string equal to itself with the trim function. 12 00:00:50,697 --> 00:00:54,150 This will clear up any unintended whitespace that wouldn't be allowed in our 13 00:00:54,150 --> 00:00:54,690 file name. 14 00:00:57,030 --> 00:01:00,217 Now it's time to replace the underscore. 15 00:01:00,217 --> 00:01:04,283 I'll write, another statement that sets the string 16 00:01:04,283 --> 00:01:08,900 equal to itself; name equals name with the replace method. 17 00:01:10,290 --> 00:01:15,611 Inside the method, we'll type the character that we're searching for; 18 00:01:15,611 --> 00:01:20,930 a space followed by a comma and then the value we'd like to replace it with, 19 00:01:20,930 --> 00:01:26,398 an underscore, Now I'll save my AppJS. 20 00:01:30,430 --> 00:01:33,626 Refreshing the browser, and type a name. 21 00:01:39,194 --> 00:01:40,558 One thing's missing. 22 00:01:43,430 --> 00:01:48,189 We'll go back and run toLowercase, 23 00:01:51,749 --> 00:01:54,807 On the name variable, save again. 24 00:01:58,770 --> 00:02:06,600 Now when we type our name, We get the desired output. 25 00:02:06,600 --> 00:02:10,980 katherine_johnson.jpg in all lowercase letters. 26 00:02:12,090 --> 00:02:15,370 Great job getting more familiar with string methods. 27 00:02:15,370 --> 00:02:20,220 As always, make sure to keep practicing what you've learned in your code. 28 00:02:20,220 --> 00:02:20,880 Happy learning.