# Java first part help

**URL:** <https://forum.freecodecamp.org/t/java-first-part-help/241813>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [November 23, 2018, 11:10pm UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813 "2018-11-23T23:10:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jexs](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jexs](https://forum.freecodecamp.org/u/jexs)\
**Post date:** [November 23, 2018, 11:10pm UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813/1 "2018-11-23T23:10:24Z")

</div>

**Tell us what’s happening:**  
I’m new to java programming i have no idea what im doing

**Your code so far**  
// Example

var ourName;

// Declare myName below this line

myname = John

```js

// Example
var ourName;

// Declare myName below this line
myname = John

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36`.

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![jexs](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jexs](https://forum.freecodecamp.org/u/jexs)\
**Post date:** [November 23, 2018, 11:12pm UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813/2 "2018-11-23T23:12:20Z")

</div>

" In computer science, data is anything that is meaningful to the computer. JavaScript provides seven different data types which are `undefined` , `null` , `boolean` , `string` , `symbol` , `number` , and `object` .

For example, computers distinguish between numbers, such as the number `12` , and `strings` , such as `"12"` , `"dog"` , or `"123 cats"` , which are collections of characters. Computers can perform mathematical operations on a number, but not on a string.

Variables allow computers to store and manipulate data in a dynamic fashion. They do this by using a “label” to point to the data rather than using the data itself. Any of the seven data types may be stored in a variable.

`Variables` are similar to the x and y variables you use in mathematics, which means they’re a simple name to represent the data we want to refer to. Computer `variables` differ from mathematical variables in that they can store different values at different times.

We tell JavaScript to create or declare a variable by putting the keyword `var` in front of it, like"

**I pretty much don’t understand any of this i’m totally new to coding**

---

<div class="post-metadata">

**Author:** ![nick2o](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nick2o](https://forum.freecodecamp.org/u/nick2o)\
**Post date:** [November 24, 2018, 2:21am UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813/3 "2018-11-24T02:21:18Z")

</div>

It said Javascript have variables that are used to store data. The data could be of one of the 7 data types that javascript have. Then it give you and example of number data type `12`, `20` ,`30` and also of string data type `"12"`, `"20"`, `"30"`, `"String"`. So from this you know that string are collections of characters between " " or ‘’ (single or double quote), so 12 is number data type and “12” is string. So your name should be between " " like “your\_name”. Then it say the way to declare or create a variable is using the command var followed for the name or label of the variable and the code show it like `var ourname;` (ourname is the name or label of the variable, the semicolon is used to indicate the end of the command). so you should use var myname = “Jhon”; .If you dont use the quotes the parser (program that read your code) will belive that Jhon is a name of a variable or something else since is not written like a string.

---

<div class="post-metadata">

**Author:** ![CaryCobb](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CaryCobb](https://forum.freecodecamp.org/u/CaryCobb)\
**Post date:** [November 26, 2018, 10:20pm UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813/4 "2018-11-26T22:20:25Z")

</div>

When you make a variable, you’re not only telling Javascript (and us!) the value of the variable, you are telling us the type as well. var myName = null; is a valid statement in javascript because null has a specific meaning. John does not. Not unless you were to make a var John = “Johnny”;

Text in Javascript will need to be a string, which is always surrounded by " " or ’ '.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 2, 2021, 11:24am UTC](https://forum.freecodecamp.org/t/java-first-part-help/241813/5 "2021-02-02T11:24:27Z")

</div>

Closed on February 2, 2021, 11:24am UTC


