JS – Mastering Browser Console: Creating a Dynamic Login Form with Declarative Programming
The browser console is typically utilized by most developers just for output information, using functions like console.log(), console.warn(), or console.error(). However, the browser console is interactive and can assist us in many situation if we know how to interact with that.
Normally
when we use some console environment to perform some programming, it is most
likely to adopt the Declarative Programming paradigm, which we want to receive
the result, the output of a certain function after every instruction, and it differs
from the Imperative Programming, which we previously define a set of
instructions which control the flow of the code execution.
Basically
from the browser console we can input and execute JS instructions in the same
way we do when we programming in JS using .js files or add code inside
<script> tags. However, the benefit of using the console is that we can
interact with the JS objects in the exact point of interest, then, we can read
or write over the objects state and interact with them, seen the consequences.
It could be very useful for
analysing complex scenarios .
And
moreover, one most nice feature of browser JS console is that it allow us to
interact with DOM objects, it means we can interact with every object that is
available in the screen, updating their attributes right after every
instruction.
This
possibilities aligned with the nice environment the browser provide to us, with
autocomplete and printing features can be a powerful tool in your daily
programming.
You can see
a demonstration about how to use the browser console at this video:
You can
download the how source code of this example here:
Comments
Post a Comment