WEBVTT 0 00:00.140 --> 00:00.460 All right. 1 00:00.470 --> 00:02.400 Time for another challenge. 2 00:02.400 --> 00:05.970 Now currently we've got two inputs inside our form. 3 00:05.970 --> 00:09.470 One is called post body and one is called 4 00:09.480 --> 00:18.060 post title. And we know the inside our app.js we currently can log the post title that gets sent 5 00:18.240 --> 00:23.590 to our compose route through the post requests that the form initiates. 6 00:23.700 --> 00:27.980 So when we click the submit button we send over two pieces of data, 7 00:28.140 --> 00:30.910 the text area and the input. 8 00:31.140 --> 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 00:39.240 --> 00:39.800 well. 10 00:40.080 --> 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 00:48.020 --> 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 00:54.150 --> 00:57.530 in here because I'm tapping into that variable 13 00:57.530 --> 01:02.600 post body which is what I defined inside the name for our text area. 14 01:03.060 --> 01:10.530 The next challenge is instead of console logging the post body or the post title inside this callback 15 01:10.530 --> 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 01:20.040 --> 01:25.530 title that gets passed over as well as the post body that gets passed over. 17 01:25.830 --> 01:29.450 So pause the video and try to complete that challenge. 18 01:31.530 --> 01:38.460 All right so if you've forgotten how Javascript objects look in terms of their syntax then take a look 19 01:38.610 --> 01:40.500 at my first hint. 20 01:40.560 --> 01:45.090 So this is how you would create a standard Javascript object. 21 01:45.090 --> 01:49.100 You would have a var keyword to show that you're creating a new variable. 22 01:49.470 --> 01:53.790 And then you would give your new object a name whatever it is you wish. 23 01:54.000 --> 01:58.630 And then you would have an equal sign and you would open up a set of curly braces. 24 01:58.690 --> 02:04.370 Now inside the curly braces you can have key value pairs and as many as you wish. 25 02:04.470 --> 02:10.200 You can even nest key value pairs as the value of a particular key. 26 02:10.530 --> 02:18.270 The parts in purple are the parts that you would need to change in order to create a custom object. 27 02:18.270 --> 02:22.460 So with this hint in mind now try and complete the challenge.