ENJOY IT I AM WRITING THE OTHER PART TO MAKE A COMPLETE PDF:
// Declaration of a variable //
/ *
What is a variable ?: A variable is like a box in which information is stored
of any of these three types: STIRNG (Text string), Number (Numbers)
and Bolean (It can only be or false).
How do we declare it ?: You can declare it in this very simple way:
var Chicken = [2, 4, "Hello", true, false];
* /
var Papa = 4; <// What do we do with this as coming? ...
/ *
With this variable we can do miles of things ...
From simply requesting it ... you have to change its value, use it or change your type of object
a string or bolean to make a price system with just entering the variable
dad...
// How to show a variable //
I know these:
document.write; <- What is this ... how is it coming? Document means Document
We are talking about the document ... Which document?, The document or the
documents that are associated with the JS (JavaScript) code, and Write means Write
Where will you write ?: This is written in the document, which document ?:
The already mentioned. So in conclusion we are telling you or ordering you to write
in the document associated with the JavaScript code what we want you to write
in this case to use the variable Dad whose value is 4.
We will say or we will order the pc to write in the document the variable papa,
How do we do it ?: Well with the order in English ... document.write (Pope);
Why the point after document?: The point is a command divider
it's like saying "in the document (document)" "you have (.)" "a writing (write)" ...
alert(); <What is this ... how is it coming? alert means alert we are talking
of an alert As it alerts ?: Well in this case it would be a picture where it would show
a text or an information What text or information ?: the one that we tell or order
As we ordered you to alert something. then with the parenthesis () <What goes in those parentheses?
You can go a variable.
console.log; <What is ... How is it coming? console means console What console or what is console ?:
the console is the part of the registry of a browser in which when an error occurs
in it the syntax or error is recorded, the location of the error and why it was caused
thanks to this console we can know what is happening and if we have made any error in the code
For example: we have a line of code and we make a mistake, without this console we have to review
those thousand lines of code or they need to do all the code again ... And going back to the topic
console (console) we are ordering the computer that produces something in it What will it produce ?:
then a record (Registration) Which record ?: which we tell you ... In this case we will use as
register to the variable papa .. How do we do it ?: Well, writing the sentence or the command
console ("in the browser console"). ("has"). log ("a record") <Console.log (Papa) <How is a
variable and not a text string because we do not put it on Comillas ... then there is console.log (Papa)
the code would tell the computer that "in the browser console make a record of the variable dad."
You already know how to make an alert and declare a variable ...
Now with this knowledge I want you to make a variable for each type of approach in the computer
one for console.log (), one for alert (), one for document.write ();
The image is of:
LEAVE YOUR CRITICISM;) AND TELL ME HOW IT GOES;) AND IF YOU WANT THE SECOND PART