Shortcuts for Copy, Paste etc?

Tell us what’s happening:

Your code so far

function chainToSwitch(val) {
var answer = "";
// Only change code below this line

if (val === "bob") {
  answer = "Marley";
} else if (val === 42) {
  answer = "The Answer";
} else if (val === 1) {
  answer = "There is no #1";
} else if (val === 99) {
  answer = "Missed me by this much!";
} else if (val === 7) {
  answer = "Ate Nine";

// Only change code above this line
return answer;


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Edg/86.0.622.38.

Challenge: Replacing If Else Chains with Switch

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

1 Like

Hi there - all I am looking for are finding out what are the shortcuts for Javascript on FCC for cut, copy, paste and any others that are often used?

There’s nothing special about JavaScript or freeCodeCamp in this context. They are the same keyboard shortcuts that you’re used to: Ctrl+C, Ctrl+V, etc

Thank you very much ArielLeslie, appreciate the answer.

save yourself some time with or
switch(val) {
case ‘…’: code; break;
or you haven’t learned that yet?

Hi, Harel
Thanks for your reply. I am just getting into the switch section at the moment, I am very new at this.