Console.log() nowhere to be found

Console.log() nowhere to be found
0

#1

Hi! So I seem to be having a idiot moment cause for the life of me I can’t find where console.log() is printing to
in my chrome console. I am in the middle of the JavaScript debugging section and kinda need to know this.
XD I’m using Version 70.0.3538.67 (Official Build) (64-bit) of chrome and specifically on challenge
Debugging: Catch Unclosed Parentheses, Brackets, Braces and Quotes
Any help would be great.

There is a screen shot of what i’m doing.


#2

The browser isn’t running the code because of a syntax error. It’s telling you that in chrome’s console and the FCC console. You’re missing a closing bracket on the array declaration.

[EDIT] You have a second error in the parameter declaration for your arrow function. You can skip enclosing parentheses for the parameters ONLY IF you have one parameter. You have 2, and you have the opening parenthesis, but not the closing one.


#3

so I have to fix my code before the console.log will run??
I haven’t even tried to solve the code yet just cause I want to see if console.log will print.


#4

The console is running. It’s displaying the errors :slight_smile:

If you want to see how console.log prints your output, then just create a test.html file with the following content and run it in Chrome:

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<script>
	console.log("test");
</script>
</body>
</html>

#5

I’m not sure, but I think this will help, if you’re still confused.


#6

yes I see the errors but, I want to see the string I printed.
say I have this code

const number = 44;
console.log(number);

cons rndm1 = 12;
const rndm2 13;

only the errors are displayed. number is never printed. Or at least I can’t see it.


#8

This is largely unuseful. You got me, but please delete this post. It’s soft trolling, but it’s still trolling.


#9

I think that’s how JavaScript works…If there’s one error in your script, it will break your entire script and give the errors in the console. So until you fix the errors, your console.log() won’t display…


#10

@mslilafowler k… sad face. thanks for clearing that up.


#11

For example: Did you know there a is a burgeoning community of 1337 H4XX0Rs who share your love of memes pWning N00bs? It’s called r/programmerhumor, and you have a to take an in-depth class in array indexing to join.