Hey, I worked on this challenge, wasn’t successful at a solution and looked at the hint solution. I put the solution code into my Brackets editor and I get my code printed out in the browser rather than the solution. The code I put into the is the same as the hint and yet I’m getting my code "mirrored " back. What do you think I am doing wrong? Roger, with a puzzling headache.
Are you just opening the js file in your browser? Because that will just show you the file. You need to load it in an html file instead - something like this
<html>
<head>
</head>
<body>
<script src="myscript.js"></script>
</body>
</html>
Thanks Richard, I realize getting back to this, my mistake was not saving the file as index.html. I have since made the js as an external file. Now the slippery part for me is the getting the solution to appear in the browser window. I have this code in the js file and do I have the last 2 lines correct? Or would you code this differently. Cheers, Roger.
let array = [ 7, “ate”,"", false, 9];
function bouncer (array) {
return array.filter(Boolean);
}
bouncer ([7, “ate”,"", false, 9]);
console.log (bouncer);