Using js in CodePen

Using js in CodePen


Hey everyone! I need a little assistance with something probably very simple. I am trying to mess around with some of the exercises outside of the lessons and I want to test different effects of javascript in codepen. I managed to successfully get a textbox to pop up fine, but now I’m trying to use the console feature but none of my functions show up there, even when I copy and paste and I know the code is correct. I save, click “run” and get nothing. Does anyone know why?

This is what I’m trying to run:

var myName;
myName = "Mike";
console.log("My name is " + myName);


Which console? The one built into codepen? or the “real” one in the browser? Try the real one if you haven’t already(find ‘developer tools’ in the menus)