March 2021
Beginner
404 pages
5h 47m
English
We covered functions back in Chapter 8, but now it’s time to dig a bit deeper and look at some more advanced topics specific to JavaScript.
In this chapter, we’ll be covering the following:
When a function has quite a few parameters, it can be difficult to remember what order to write the arguments in when you call the function. For example, consider this function that returns a styled <div> element:
function heading(text,color,size,bgcolor){
return `<h1 style='color:${color};background-color:${bgcolor};font-size:${size}>${text}</h1>`
}
This uses positional parameters, which ...
Read now
Unlock full access