Road to code

171 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
171
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Road to code

  1. 1. JavaScript Basics
  2. 2. Data Types• Numbers• Strings• Boolean• JS is a dynamically typed language
  3. 3. Operators• Assignment operators = , +=• Comparison operators == , != , < , >• Arithmetic operators +, - , /, *• Bitwise operators• Logical operators• String operators• Special operators
  4. 4. Control Flowif (condition)statement_1[elsestatement_2]
  5. 5. Loopfor ([initialExpression]; [condition];[incrementExpression])statementwhile (condition)statement
  6. 6. FunctionsA function definition (also called a functiondeclaration) consists of the function keyword,followed by• The name of the function.• A list of arguments to the function, enclosedin parentheses and separated by commas.• The JavaScript statements that define thefunction, enclosed in curly braces, { }.
  7. 7. function square(number) {return number * number;}

×