x=a+6 or simmply one like
If you were to use these expressions often, it would save you time not having tp write the wole expression over and over. You would then equate them to a value; for example every time we need a value of
a+6 we would just call
x() returns the value of
Luckily programming has been around for such a long time that we have in built functions. We don’t have to reinvent wheels.
For Example, if I wanted to change part of the sentence
My name is David which is store in a variable
myName I would call the inbuilt function
replace() and pass in the source string and the target string
copy the code and paste into app.js
Run the code by opening the index.html in the chrome browser, and navigate to developer tools to see the String
In the Next Lesson we are going to start working seeing the changes directly in the weblage by adding interactivity into our
Back to Topics 👈🏻
Functions, Part 2 Click here👉🏽
Take one minute to let us know what you want us to cover here Here .