Tell us what’s happening:
I’m not sure if my brain has broken down and I’m missing something, but console.log doesn’t seem to be working for me. I’m trying to debug some code for an exercise and now I need to debug my debug method…
Sorry, it’s messy right now with a lot of code marked out. I have a few different console.logs and nothing shows up. I’ve even tried marking out ALL the code except for one line of console.log and still nothing.
Your code so far
console.log('test');
function getIndexToIns(arr, num) {
var newArr = arr;
//newArr.sort(function(a,b){
// return a-b;
// });
console.log(newArr);
/*
var int = 0;
for (i = 0; i < newArr.length; i++){
if ((num > newArr[i - 1]) && (num < newArr[i])){
int = i;
}
}
return int;*/
}
getIndexToIns([5, 3, 20, 3], 5);
console.log('test');
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.
Link to the challenge:
https://www.freecodecamp.org/challenges/where-do-i-belong