text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
find me the button on the page and turns | 1,680.419 | 3.781 |
out there's only one button here so it's | 1,682.789 | 2.64 |
fine though if there were more I might | 1,684.2 | 2.55 |
have to be a little bit more specific | 1,685.429 | 4.23 |
but once I get that button then I'm | 1,686.75 | 4.799 |
going to access it's on click property | 1,689.659 | 4.921 |
and I'm going to set it equal to count | 1,691.549 | 5.73 |
and what does count count is the name of | 1,694.58 | 4.86 |
a function count is itself a function | 1,697.279 | 4.801 |
and so what I'm here saying is I would | 1,699.44 | 4.92 |
like to set the value of the onclick | 1,702.08 | 4.29 |
property of the button equal to count | 1,704.36 | 3.539 |
the count is the function that should | 1,706.37 | 4.95 |
run when the button is clicked on and | 1,707.899 | 5.671 |
notice that I am not actually calling | 1,711.32 | 4.05 |
the function it's not count and then | 1,713.57 | 3.479 |
parentheses which were being run the | 1,715.37 | 3.75 |
count function and then get its return | 1,717.049 | 3.931 |
value and use that as the value for | 1,719.12 | 4.289 |
onclick I'm just setting on click equal | 1,720.98 | 4.949 |
literally to the count function itself | 1,723.409 | 3.87 |
without actually calling the function | 1,725.929 | 3.84 |
and what this is going to do is it is | 1,727.279 | 4.11 |
going to say when the button is clicked | 1,729.769 | 3.931 |
on then and only then should you | 1,731.389 | 4.41 |
actually run this count function and | 1,733.7 | 3.06 |
we're not going to run the count | 1,735.799 | 4.201 |
function until that button actually gets | 1,736.76 | 5.25 |
clicked on and so in JavaScript | 1,740 | 4.679 |
functions can be treated as values of | 1,742.01 | 4.799 |
their own just as you can set a variable | 1,744.679 | 3.99 |
equal to a string just as even set a | 1,746.809 | 3.75 |
variable equal to an integer just as you | 1,748.669 | 3.811 |
can set a variable equal to like an HTML | 1,750.559 | 3.601 |
element like the result of document | 1,752.48 | 3.99 |
query selector you can also set a | 1,754.16 | 4.83 |
variable equal to a function something | 1,756.47 | 4.59 |
like count and passed that around as a | 1,758.99 | 4.56 |
value just as you could with any other | 1,761.06 | 3.99 |
value and this is a paradigm we | 1,763.55 | 3.09 |
generally call functional programming | 1,765.05 | 4.35 |
where we have functions as values of | 1,766.64 | 4.14 |
their own things that we can reassign | 1,769.4 | 3.6 |
things that we can manipulate just as we | 1,770.78 | 6 |
could have any other value so now I can | 1,773 | 5.22 |
try and run this program by going ahead | 1,776.78 | 3.39 |
and refreshing the page I'll refresh it | 1,778.22 | 4.92 |
at zero I press count and alright | 1,780.17 | 4.98 |
nothing seems to be happening it's still | 1,783.14 | 4.32 |
zero I want it to be counting but it | 1,785.15 | 4.35 |
doesn't seem to be working so why not | 1,787.46 | 3.81 |
any time you run into problems in | 1,789.5 | 3 |
JavaScript where you're not getting the | 1,791.27 | 2.94 |
behavior you want often it can be | 1,792.5 | 3.21 |
helpful to look at the JavaScript | 1,794.21 | 3.57 |
console where the JavaScript console is | 1,795.71 | 3.84 |
the equivalent of like the terminal | 1,797.78 | 3 |
window and when you're running your | 1,799.55 | 3.06 |
Django application in Python that would | 1,800.78 | 3.51 |
display any error messages the | 1,802.61 | 3.69 |
JavaScript console will display any of | 1,804.29 | 3.84 |
the JavaScript logging information and | 1,806.3 | 4.68 |
error messages as well in chrome I can | 1,808.13 | 4.74 |
get to it if I first go ahead and go to | 1,810.98 | 4.86 |
inspect and then just open up the | 1,812.87 | 5.55 |
console tab here and all right we seem | 1,815.84 | 4.2 |
to have some sort of error here it's an | 1,818.42 | 4.59 |
uncaught type error that says we cannot | 1,820.04 | 7.17 |
set property on click of no encounter | 1,823.01 | 7.11 |
dot HTML line 18 so that will generally | 1,827.21 | 4.38 |
tell you where the error is coming from | 1,830.12 | 3.87 |
it's coming from counter HTML on line 18 | 1,831.59 | 4.74 |
and the problem seems to be but I'm | 1,833.99 | 4.47 |
trying to access the on click property | 1,836.33 | 5.07 |
of no and no is JavaScript way of | 1,838.46 | 4.89 |
expressing like nothing some object that | 1,841.4 | 5.07 |
doesn't exist so somehow I'm trying to | 1,843.35 | 5.1 |
set the onclick property of no well | 1,846.47 | 3.9 |
let's see what's going on on line 18 and | 1,848.45 | 4.14 |
see if we can figure out what's | 1,850.37 | 2.91 |
happening there | 1,852.59 | 3.24 |
well alright here is line 18 where I say | 1,853.28 | 4.14 |
document dot query selector button | 1,855.83 | 4.08 |
setting it's on click property equal to | 1,857.42 | 4.86 |
count and now what seems to be the | 1,859.91 | 4.32 |
problem here well the error message was | 1,862.28 | 4.26 |
that I was trying to modify the onclick | 1,864.23 | 4.92 |
property of no well here then is the | 1,866.54 | 4.86 |
onclick property so why would this | 1,869.15 | 4.62 |
document query selector button be | 1,871.4 | 4.65 |
returning or giving me an output of no | 1,873.77 | 4.59 |
well it turns out the document dot query | 1,876.05 | 4.35 |
selector will return null if it's not | 1,878.36 | 4.23 |
able to find something if I try and find | 1,880.4 | 4.08 |
a button but it's not able to find a | 1,882.59 | 3.57 |
button well this seems a little bit | 1,884.48 | 3.12 |
strange because there's a button down | 1,886.16 | 1.77 |
here | 1,887.6 | 3.66 |
24 that I'd like for my JavaScript code | 1,887.93 | 5.28 |
to be able to find when it runs query | 1,891.26 | 4.23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.