The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.
Multiple functions
Now we define more then one function.
As a reminder: A function with name
color
returning the value
'red'
is defined as followed:
function color() {
return 'red';
}
Exercise
Define two functions. The first function
a
should return
'Hello a!'
and the second function b
should return
'Hello b!'
.
+ Hint
function a() {
return ...
}
function b() {
return ...
}
+ Solution
function a() {
return 'Hello a!';
}
function b() {
return 'Hello b!';
}