-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascriptbasics.html
More file actions
97 lines (79 loc) · 4.79 KB
/
Copy pathjavascriptbasics.html
File metadata and controls
97 lines (79 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Javascript Basics</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
<div id="mainBlock">
<br>
<div id="title">
<h1 id="text">JavaScript Basics</h1>
</div>
<div id="menu">
<br>
<a href="">Home</a>
<ul>
<li><a href="">JavaScript Overview</a></li>
<ul>
<li><a href="">Variable Declaration</a></li>
<li><a href="">Variable Assignment</a></li>
<li><a href="">Data Type</a></li>
<li><a href="">Conditionals</a></li>
<li><a href="">Loops</a></li>
<li><a href="">Functions</a></li>
</ul>
<li><a href="">Projects</a></li>
<li><a href="">Assignments</a></li>
<li><a href="">Quiz</a></li>
</div>
<div id="mainBody">
<h2>JavaScript Basics</h2>
<p>
JavaScript is across-platform, object-oriented scripting laguage. JavaScript is extremely popular for
a variety of reasons.It's small and lightweight language allowing maximum flexability for develpers to
take it in a bunch of different directions. JavaScript lives inside a host environment(web browser or Node server),
it can be connected to the objects of these environment to provide programmatic control over them.
<ul>
<li><a href="">Variable Declaration</a> JavaScript variables are containers for storing data,
imagine a cup you fill with coffee, the cup holds the coffee,a variable holds a value.
All javascript variables must identified with unique names.These unique names are called
identifiers. <var>var x; </var>
</li>
<li><a href="">Variable Assignment</a> Assignment opertators assign values to variables-our
cup can now have coffee poured in it, giving our variable a value to hold.
The = assignment operator assigns a value to a variable. <var>var x=10;</var>
</li>
<li><a href="">Data Types</a> Data types are an important concept, to be be able to operate on
a variable you need to know the data type, there are six data types:
Boolean-<var>true</var>or <var>false</var>, null- <var>null</var>aka nothing,
Number- <var>42</var> or <var>3.1345</var>; String - <var>"Coding Dojo Rocks";</var>
Array - <var>[1,"Coding",2,"Dojo"];</var> and object - <var>{first_name:'jane', last_name: 'Doe'}</var>
</li>
<li><a href="">Conditionals </a>When you write code, you want to perform different decisions- hitting
different code blocks based on values or conditions that have been met. you can use Conditional
statements in your code to accomplish this. There are the following conditonal statements:
<var>if</var> a specified condition is true,do this code block: <var>else if</var>to specify a new
condition to test,if the first condition is false, <var>else</var> we execute this block of code;
</li>
<li><a href="">loops</a> There are many different kinds loops in every programming language, but they allowing
do the same thing: they will repeat an action some number of times. Imagine you have to run a mile, well you
run around the track four times and then you stop. That's a loop!
</li>
<li><a href="">Function</a> Functions are an encapsulation of a code block. When we call our function,this will
run our code block. Think of it as a list of instructions. As an example imagine we are putting together a desk
from Ikea, we open up the instruction manual and get started,first we screw the legs to the table top; next we
place the table the right way up. Done! We finished our instructions. Sadly there are a ton more tables to do so
lets call our function over and over again.
</li>
</ul>
</p>
</div>
<div id="moreInfo">
For more useful information check out this url: <a href="">JavaScript!</a>
</div>
</div>
</body>
</html>