Posts

Image
      Hello  This is the day 30  of #30 days of javascrip coding, at this day  I studied  Object  Lesson    and   i learned that 1- Object t has properties or data and has specific actions  that it performs with methods. 2-The Window and the Location types are Object, knowing that the Location is considered a Nested Object from the Window, which is also an Object. 3-After that, when I use the href with the Window.Location object, here it expresses the properties, and here I inquired about a property or data, which serves as a link to the site that I opened, it is information! 4- But if you are dealing with a Method that executes a specific Action, then why do we use assign with Window.location 5- Here in Action, it will happen that the site that I opened will change its address to the Google site and the Google site will open instead. Here in Action, it happened and it remains under the scope of the Method, and this is the difference between Properties and Methods. T hat's what I l
Image
    Hello  This is the day 29  of #30 days of javascrip coding, at this day  I studied Scope – Lexical (Static) Lesson    and   i learned that 1- The lexical scope in the function is not equivalent to if you have a nested function, then the child function can access the variables in the parent function, and so every function inside the function can access the variables of the function that is descended from it. 2-If the child function has no variables in the father function, it has access to the variables in the Global Scope 3-In this Child Function, I used the Console to print the variable a, which is present in the Parent Function. The Child function can access anything present in the Parent function. 4-If this variable a exists in the Child Scope, of course, intuitively, you will take the variable a from the Local Scope. 5-Every function inside a function accesses the variable of its parent function, but the opposite does not happen T hat's what I learned today  and this is the
Image
      Hello  This is the day 28  of #30 days of javascrip coding, at this day  I studied  Scope – Global And Local Lesson  and   i learned that 1-  The Scope is the concept of controlling the presence of your variables and access to them, meaning that through the Scope you will be able to control your access to the variable. 2- Because, in one way or another, it is not logical at all that all variables can be delivered from anywhere 3- Through these codes, I was able to access these variables from anywhere easily, because the Scope has Global, so it was easy to access these variables from anywhere, or even using any syntax such as loop and If. I can access them from anywhere and in any form. 4- Even from within the Function, I was able to use the variables a and b or connect them very easily, and all of this is considered the Global Scope through which I can access any variable from anywhere. 5- I created variables in the Local Scope inside the Function itself, and therefore the Consol
Image
      Hello  This is the day 27  of #30 days of javascrip coding, at this day  I studied  Return Nested Function Lesson and   i learned that 1-  A Nested Function is a function that performs a specific function within another function 2- First, I created a basic function called sayMess inside it. I put 2 parameters inside this basic function. I created a variable called message with the value Hello. 3- After that, I created the Nested Function called concatMsg, and inside it I used the Message variable. Its value was Hello. Inside this variable, I used its value, which is Hello, and then I used the 2 Parameters.Those who were in the basic function 4- After that, I called the concatMsg so that I could use it, and after that, I requested that it do a return for the Message variable. 5- After all this, I used the Console and inside it was the name of the original Function and put the 2 Arguments in it. T hat's what I learned today  and this is the codes i have typed
Image
        Hello  This is the day 26  of #30 days of javascrip coding, at this day  I studied  Function Rest Parameters Lesson   i learned that 1-  Suppose that I have an unknown number of Arguments, and every time I add an Argument, I am forced to add a new Parameter, and thus I start entering the Parameter into the calculation process. 2- This may apply, for example, if someone enters a site and wants to post his Skills, the Skill may be one, 10, or an unknown number. 3- Here comes the role of the Rest Parameters. In short, writing it consists of 3 points, then the name of the Parameter, and its purpose is to create an infinite number of Params. 4- I will also notice something that the Parameters Rest is an Array, so I can deal with it and with any Argument that forms a Value for this Para. It is an element of the Array, meaning I can use the Length and use all the properties of the Array. T hat's what I learned today  and this is the codes i have typed
Image
        Hello  This is the day 25  of #30 days of javascrip coding, at this day  I studied  Function Default Parameters Lesson   i learned that 1-  The Default Value, if there is no value for the Parameter, it  will be Undefined 2- If you do not write a value for the age parameter, the result will be Undefined by default 3- However, if the user actually did not enter the Age, it would not make sense for it to be Undefined, and it would be better if an alternative message was printed in its place. This can be done in 3 ways, including the ES6 method. 4- The first way is to make a condition if the default age value is Undefined. This definitely indicates that the user neglected to enter the age value, because Undefined does not appear unless the user neglected to write the age. 5- Here, if the value of age becomes Undefined, meaning the user left it empty, print the place of the variable age. This is an alternative word called Unknown, so I stored it as a variable in the age so that it i
Image
  Hello  This is the day 24  of #30 days of javascrip coding, at this day  I  Function Intro And Basic Usage Lesson and   i learned that 1-  The Function is a code that executes certain things. The purpose of using the Function is that it applies a principle called DRY, which stands for Don’t Repeat Your Self. Meaning, if you have a specific task that you do every once in a while, here I use the Function in order not to repeat it every time. 2- There is a Function that is Built-in in the JavaScript language, meaning a Function is always ready and is used to execute a specific command, such as when you use the Consol.log, which is also considered a Function. Its function is to print commands 3-  There is another type of Function called User-Defined, which is the Function that is created by the user. 4- The Function accepts two things, the first is the Parameter and the second is the Argument 5- The username is the parameter that is entered into the function and is expressed as Variable