We have declared an array let animals = ["dog", "cat", "hamster"];
. We want to temporarily comment out the element "cat"
, and to do this, we can modify the declaration as follows:
let animals = ["dog", "hamster"];
let animals = ["dog", #"cat",# "hamster"];
let animals = ["dog", //"cat",// "hamster"];
let animals = ["dog", /*"cat",*/ "hamster"];
Answers Explanation & Hints:
In JavaScript, you can use the Therefore, modifying the declaration of the |