Transcript from the "Setting Statement Element" Lesson
>> Let's keep going with TODO 3. So now we're gonna actually do something on the page, which is we're gonna take this statement, so in my case it was one plus one equals, equals, equals, equals two. In this case, it's a razor like object, whatever yours said. That statement text, the question or sort of the, true or false arrays are like objects, true or false one plus one equals equals equals two.
[00:00:23] We're gonna put that in this box here, like I have on this example. Right now our box is empty, we're gonna put it in there and make it not empty. So, how did we do this one? Who can walk me through their solution?
>> All right, statement.textContent.
>> So, statement now refers to what again?
[00:00:48] Our variable from before which we said was this element, beautiful. Okay, so statement.textContent.
>> Great. Full stop. So now if I save and if I go back to my local file, here we go, my local file. And I'm going to refresh. Look at that.
[00:01:53] But before we move on, any questions on TODOs one, two or three so far?
>> I did the same thing, statement.textContent equals factor statement, content doesn't capitalize.
>> Yes, case sensitivity and property names. So text little case content is not gonna be the same thing as text uppercase C content.
[00:02:16] And again, this is why, again, any text editor that you're using is totally valid. But this is why things like IDEs are helpful because they have knowledge about what we already have in the program. So right now it already knows that statement, it's an element from the DOM, and so it knows some of the properties that it has.
[00:02:39] So you'll notice that when I start typing text, it's gonna auto-populate this little list of options and I can tab through and get text capital C content. So this is just another kind of advantage of using an IDE like VS Code for example.