Java Script Language (Code)

Basic Coding information from Code Academy  (Language: Java Script)

Java Script

What am I learning?

This is JavaScript (JS), a programming language. There are many languages, but JS has many uses and is easy to learn.

What can we use JavaScript for?

  • make websites respond to user interaction
  • build apps and games (e.g.blackjack)
  • access information on the Internet (e.g. find out the top trending words on Twitter by topic)
  • organize and present data (e.g.automate spreadsheet work; data visualization)

Lesson 1 (Getting to know you)

Writing Your Name- I does not specifically have to be your name but when you want to write something you have to put a quotation mark and type in what you want to say and close it with a quotation mark.                                                                Ex: "Hyeonjoon Kim"

Discover the Length- When you want to get a length of the word or a paragraph you first put a quotation mark then type your word or a paragraph next then you put another quotation mark then add a period to fully end it then type in length.                                                                                                                                          Ex: 'Hyeonjoon Kim".length

Basic Math- The computer can do basic math by you putting a code. In this case you do not have to put quotes for the computer to recognize but just simply put the numbers and the operating symbol to tell the computer what to do. (You use + for adding, - for subtracting, * for multiplying, / for dividing)                                                  Ex: 5+5 and 6-6

Numbers and More- You can also do * for multiplying and / for dividing numbers for the computer to do Basic Math. (Look Above)                                          N.                                  Ex: 5*5 and 6/6

Making Errors- There are some things you can't do in the console. Computers only speak certain languages like Java Script. If you use words that are not in the Java Script language the computer will be confused and give you an error. Ex: Hyeonjoon.K

Lesson 2 (Why learn Programming)

Editor and Comments- The // sign is for comments. A comment is a line of text that JavaScript won't try to run as code. It's just for humans to read. Comments make your program easier to understand. When you look back at your code or others want to collaborate with you, they can read your comments and easily figure out what your code does. (You do not have to put it both sides of your comment put it when you start you Comment.)                                                                                             Ex: // Hyeonjoon Kim.

Confirm- To confirm something in Java Script Language you first type in confirm and no spaces you put a parenthesis then you put a quotation mark and type in what you want to type. When you are done close the quote with a quotation mark and also the parenthesis. When you are done with that also put a semicolon to finish.                                                                                                                            Ex: confirm("Hyeonjoon Kim");

Extra Information

What is Programming?

Programming is like writing a list of instructions to the computer so it can do cool stuff with your information.Programs can't yet make your bed, but they can do math, keep track of your bank account, or send a message to a friend.To do any of these actions, the program needs an input. You can ask for input with a prompt.

Prompt- To type in a Prompt you need to first type in prompt and with spaces put a open parenthesis then a quotation mark. When you are done with that type in what you want to type then close the prompt with a close quotation mark and with  a close parenthesis. Then at last add the the semicolon without any spaces and your prompt is done.                                                                                     Ex: prompt("Hyeonjoon Kim");

Numbers- Are quantities, just like you're used to. You can do math with them.

Strings- are sequences of characters, like the letters a-z, spaces, and even numbers. These are all strings: "Joon", "4" and "What is your name?" Strings are extremely useful as labels, names, and content for your programs.