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. The call shout('Fire') should return 'FireFire' and should log 'FireFire'.
var shout = function(word) {
  var result = word + word;
  ...
};
var shout = function(word) {
  var result = word + word;
  console.log(result);
  return result;
};