.console, and how I go about using it


#1

In the instructions on part 2. Old Enough to Play, it tells me, "Then write an if/else statement. If age is less than 13, use console.log to tell the user that they're allowed to play but you take no responsibility."

I'm completely new to coding, what is a console.log, and how do I use it? It kinda feels like I missed a part or two.


#2

console.log is a way of printing. It's a function with parenthesis that you give a string or number or whatever too.
For instance, if I did this:

console.log("Hi my name is Kylea");

The console would display:
Hi my name is Kylea

Did you go through the first JavaScript lesson? This is one of easiest things to do, so I hope you're not overwhelmed by what the lesson is asking you to do.


#3

Haha, it seems like you've read my mind. I am quite overwhelmed, I can get frustrated easily when I can't even fathom as to how I'd go about doing something, but I'm more then determined to figure everything out, so I'm being incredibly patient!

I think I did, but perhaps somehow I bypassed it accidentally? I did feel as if I missed a lot, in the past few things it's asked of me. I'm a bit stubborn and want to learn JavaScript first, so some words even you've said are a bit vague to me.


#4

JavaScript is one of the first languages I learned too. :))
Here's a link to the first module,


let me know if you did it.

It's okay to be overwhelmed, starting programming, it's like that 95% of the time. You'll get used to it though and feel comfortable. This course has a pretty good UX, but there are of course times that you'll get stuck. Just check the hints, look at other forum topics about the trouble you're having, and even make your own posts like you did with this.

JavaScript is a great language, and it works with so many other things later on if you really decide to use it practically.

Anyways, I hope that everything goes well. :slight_smile:


#5

I recall the first step, and the second. But I believe there's plenty more to which I haven't done, thanks for that! I've always wanted to learn how to program, but in the past I've managed to make excuses. My life has since changed, and I hope to pull through with it this time. I have intentions, goals and dreams to putting my skills to the test as a in the future programmer. Something I've always been interested in is AI.

Back in the day, I spent loads of time into Warcraft III's editor, and enjoyed making the AI more intelligent, efficient, and as such, more challenging! But of course it had plenty of limitations, and certain games which focus on AI tends to gain my curiosity. I have a passion for creating ideas, but I never managed to make them into a reality. Hopefully this will allow my creativity to be put to use! I suppose we can only hope and see. I appreciate your assistance.


#6

that's such a good goal to have, and I'm sure you'll get there. this is such a good place to start. there's a really helpful community on this forum as well, and so many people want to help you learn.

I'm glad I could help, and have fun learning. What you want to do sounds interesting.


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.