Full-stack dev quiz question #14

Full-stack dev quiz question #14

quizBasic JavaScript this time in the fourteenth question of the quiz for a full-stack developer. Do you like IT puzzles?

 

 

Write strangeConcatenation function in basic Java Script so the following line of code

console.log(strangeConcatenation('what ')('is this?'));

results in what is this? output.

For one of the correct answers scroll down

.

.

.

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The function can be written like that:

function strangeConcatenation(text1) {
   return function(text2) {
      return text1 + text2;
   }
}

It is one of possible answers. Check yours by running it in a browser.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.