0 1 00:00:00,140 --> 00:00:00,460 All right. 1 2 00:00:00,470 --> 00:00:02,400 Time for another challenge. 2 3 00:00:02,400 --> 00:00:05,970 Now currently we've got two inputs inside our form. 3 4 00:00:05,970 --> 00:00:09,470 One is called post body and one is called 4 5 00:00:09,480 --> 00:00:18,060 post title. And we know the inside our app.js we currently can log the post title that gets sent 5 6 00:00:18,240 --> 00:00:23,590 to our compose route through the post requests that the form initiates. 6 7 00:00:23,700 --> 00:00:27,980 So when we click the submit button we send over two pieces of data, 7 8 00:00:28,140 --> 00:00:30,910 the text area and the input. 8 9 00:00:31,140 --> 00:00:39,240 So if we wanted to we could console log the post body that's the text that's inside the text area as 9 10 00:00:39,240 --> 00:00:39,800 well. 10 11 00:00:40,080 --> 00:00:47,520 So now if I go ahead and head over to our compose page and refresh and I just type some stuff in here 11 12 00:00:48,020 --> 00:00:54,150 and I hit publish and I go over to my console then you can see that everything I just typed gets logged 12 13 00:00:54,150 --> 00:00:57,530 in here because I'm tapping into that variable 13 14 00:00:57,530 --> 00:01:02,600 post body which is what I defined inside the name for our text area. 14 15 00:01:03,060 --> 00:01:10,530 The next challenge is instead of console logging the post body or the post title inside this callback 15 16 00:01:10,530 --> 00:01:20,040 I want you to create a Javascript object that's simply just called post and it has to store both the 16 17 00:01:20,040 --> 00:01:25,530 title that gets passed over as well as the post body that gets passed over. 17 18 00:01:25,830 --> 00:01:29,450 So pause the video and try to complete that challenge. 18 19 00:01:31,530 --> 00:01:38,460 All right so if you've forgotten how Javascript objects look in terms of their syntax then take a look 19 20 00:01:38,610 --> 00:01:40,500 at my first hint. 20 21 00:01:40,560 --> 00:01:45,090 So this is how you would create a standard Javascript object. 21 22 00:01:45,090 --> 00:01:49,100 You would have a var keyword to show that you're creating a new variable. 22 23 00:01:49,470 --> 00:01:53,790 And then you would give your new object a name whatever it is you wish. 23 24 00:01:54,000 --> 00:01:58,630 And then you would have an equal sign and you would open up a set of curly braces. 24 25 00:01:58,690 --> 00:02:04,370 Now inside the curly braces you can have key value pairs and as many as you wish. 25 26 00:02:04,470 --> 00:02:10,200 You can even nest key value pairs as the value of a particular key. 26 27 00:02:10,530 --> 00:02:18,270 The parts in purple are the parts that you would need to change in order to create a custom object. 27 28 00:02:18,270 --> 00:02:22,460 So with this hint in mind now try and complete the challenge.