VineyardAppCamp Platform

console.log() -> Makes the computer display whatever is in the parentheses.

Example: console.log(5) or console.log("Joe")



alert() -> Makes the computer make a popup appear with whatever is in the parentheses

Example: alert(5) or alert("Joe")



prompt() -> Asks the user a question based on the text in the parentheses; you can save the result to a variable!

var person = prompt("Please enter your name");



HTML is the language that you use to make websites:


HTML format looks like this:

<button> This is a button </button>

Which creates:

That's how you make a button. To make other things, just replace the button with the name of a different tag.



<p> This is a paragraph </p>

Which creates: All the text on this page!


Here's a styled button (red and with bigger font):


<button style = "background-color:red; font-size:16px;" > This is a button </button>

Which creates:

Defining a variable tells the computer (or app) to remember a value:


To make a variable you need a variable name and value:

var oneVar = 5; (if its a number)


var differentVar = "Here"; (if its a word)


If you're referring to a variable you've already defined, don't use quotes...


var fruit = "Apple"
styleValue = fruit;

If you're referring to a word, not a variable, use quotes


styleValue = "Apple"

If you're referring to a percentage, use quotes and a percent sign


styleValue = "100%"

Javascript has prewritten commands, like alert:


alert("This will make a popup appear");

Always use parentheses at the end of a command

Defining an array


var myVariable = [1,2,3,"Four"];

Defining an object


var Dictionary = {Name:"Claire", Age:10, Level: 5, Health:50};