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.

Logging and Strings

Now we want to practice logging together with string concatenation.

Exercise

Write a function shout that takes a string and returns this string duplicated. In addition, the return should be logged.

Example: shout('Fire') should return 'FireFire' and should log 'FireFire'.
function shout(word) {
  let result = word + word;
  ...
}
function shout(word) {
  let result = word + word;
  console.log(result);
  return result;
}

loving