I have a pretty simple function that i wanted to test but not sure how to see the output. do i need to create an html file and link it to a browser to see the result and console? or is there a way to see the console log directly into VsCode.
const myArray = [1,4,6,8,9,10,11,13];
findIndexOfNumber(myArray, 10);
function findIndexOfNumber(arr, target) {
console.log(arr.indexOf(target))
return arr.indexOf(target)
}
//(not looking to see if this is correct)
i wrote this up in a js file, i understand i can just make a html file and link the 2 but i want to know if there is a quicker way to just see the results in vscode from just the js file alone. i know this probably sounds lazy but if theres a faster way i want to find it