Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Meetup-js-062415

441 views

Published on

Introduction to Javascript variables using Teamtreehouse and A Smarter Way to Learn

Published in: Software
  • Be the first to comment

  • Be the first to like this

Meetup-js-062415

  1. 1. Javascript computer programming for beginners S02 6/24/2015 1kofc809.org
  2. 2. Beginning Javascript Moderator: Joe Devlin 6/24/2015 2kofc809.org
  3. 3. Beginning Javascript Today’s Event hosts • Knights of Columbus Tacoma Council 809 6/24/2015 3kofc809.org
  4. 4. A word from our hosts • Knights of Columbus Tacoma Council 809 www.kofc809.org o Founded in 1882 o Dedicated to “Saving Lives and Changing Lives” o Promoting strong families through charitable giving and a AAA rated life insurance and annuity program. o Local projects Habitat for Humanity Build, Blood Drive, Ultrasound for pregnancy care & 4US.org, Coats for Kids, Wheelchair Mission. 6/24/2015 4kofc809.org
  5. 5. Beginning Javascript Access this slideshow at: http://www.vividventures.biz/d/?q=javascript 6/24/2015 5kofc809.org
  6. 6. Introduction •Joe Devlin - moderator o Member of St Patrick’s Parish and K of C council 809 o Working as a web host for small to medium sized businesses. oInterested in Javascript for the obvious reasons that it is a must for web development, plus for the purposes of getting people together to code; JS is a universal standard that comes with freely downloadable browsers and tools. We can easily collaborate. 6/24/2015 6kofc809.org
  7. 7. Time management 6/24/2015 7kofc809.org Present Code Discuss
  8. 8. 6/24/2015 8kofc809.org Schedule 1400-1410 Setup 1410-1420 Introduce ourselves 1420-1500 Set up Teamtreehouse, codepen.io, github 1500-1530 Teamtreehouse “Javascript Basics – Introducing variables” 1530-1555 A Smarter Way to Learn Chapter 2, 3 1555-1600 Download git --local-branching-on-the- cheap
  9. 9. Attendee Introduction • Let each of us introduce ourselves o My name is ____________. (First name) o Interested in Javascript for websites that ____________. o I develop on a Mac / PC / Linux o My favorite codeschool is ________. o A coding video that I have found helpful is _____. 6/24/2015 9kofc809.org
  10. 10. Take away for today 6/24/2015 10kofc809.org • Pierce County Library apply o Teamtreehouse.com o https://teamtreehouse.com/gateways/pierce_county_public_library/signup o Why? Teachable, repeatable, powerful
  11. 11. Take away for today 6/24/2015 11kofc809.org • Set up browser bookmarks in folders as follows:  Tacoma-JS  https://teamtreehouse.com/gateways/pierce_county_pu blic_library/signup  http://codepen.io/NorthDecoder/  https://github.com/NorthDecoder  https://gist.github.com/NorthDecoder  http://git-scm.com/ o Beginner Sessions o 02
  12. 12. Take away for today 6/24/2015 12kofc809.org • Set up browser bookmarks in folders as follows:  Tacoma-JS Beginner Sessions  02  https://teamtreehouse.com/library/javascript- basics/storing-and-tracking-information-with- variables/introducing-variables  http://www.asmarterwaytolearn.com/js/2.html  http://www.asmarterwaytolearn.com/js/3.html
  13. 13. Take away for today 6/24/2015 13kofc809.org • In your finder or explorer in ‘My Documents’ create folders  manuals o Javascript download the book o Beginning Javascript o from http://it-ebooks.info/book/1068/ o Javascript Step by Step 3rd Edition pdf  from http://it-ebooks.info/book/3481/ o git download the book o Version Control with Git from http://www.it-ebooks.info
  14. 14. Requirements – just a reminder 6/24/2015 14kofc809.org HTML Validator JS - valid Test http://validator.w3.org/nu/ http://www.jslint.com/ http://www.jshint.com/ Design inputs to confirm the expected output. TDD pdf
  15. 15. Course – Teamtreehouse 6/24/2015 15kofc809.org • Teamtreehouse.com (TTH) o TTH Library search for “Javascript Basics – Introduction to Variables” • You can: • review videos at any time • retake the tests • save workspaces • earn badges !
  16. 16. 6/24/2015 16kofc809.org Syntax: for Variables teamtreehouse.com/javascript-basics/ storing-and-tracking-information-with-variables/introducing-variables Source: https://teamtreehouse.com/library/javascript-basics/storing-and-tracking-information-with-variables/introducing-variables • Storing and keeping track of information in a program, like boxes which have their own names to make the storage locations unique. • Assigning a value to the variable, right hand values into left hand location Syntax – var nameOfVariable; // with nothing in the variable OR var nameOfVariable = “insert this text value into variable”; • Assign content of one variable to another variable var anotherVariable = nameOfVariable; Retrieve contents of the variable alert(anotherVariable);//insert this text value into variable
  17. 17. Course – A Smarter Way to Learn 6/24/2015 17kofc809.org • http://www.asmarterwaytolearn.com • You can: • read the book • retake the tests
  18. 18. 6/24/2015 18kofc809.org Syntax: for Variables for strings A Smarter Way to Learn Javascript Chapter 2 Source: http://www.asmarterwaytolearn.com/js/2.html • Variables refer to values. • Strings are enclosed in quote marks. • var is the Keyword that declares a variable. • The variable is available only after it has been declared with var. var firstName = “enter first name here”; //declare & initialize firstName = “Joe”; //overwrites initial variable value alert(firstName); //output the contents of the variable • Reference: Javascript Step by Step 3rd Edition pdf Chapter 4 p. 47 • Single quotes and double quotes • var possesiveFirstName = “Joe’s”;//ok • var personalQuote = ‘Joe said “hello”’;//ok • X var possesiveFirstName = ‘Joe’s’;//not ok • Escape character is • Where ’ escapes the single quote • Where n represents newline var possesiveFirstName = ‘Joe’s’;//ok
  19. 19. 6/24/2015 19kofc809.org Syntax: for Variables for numbers A Smarter Way to Learn Javascript Chapter 3 Source: http://www.asmarterwaytolearn.com/js/3.html • A number value without quotes is a number. var base = 1; • A number with quotes is a string. var base = “1”;//string • Math can be done on a number variable. var base = 1; growth = 10; height = null; height = base + growth;// addition of two variables console.log(height);// 11 • Height has already been declared, do NOT declare it again • Calculate own new value of variable var i = 1; i = i + 1; console.log(i);//2 • Strings plus numbers turn into strings var s = "stringy"; n = 10; result = null; X result = s + n; //concatenation instead of addition console.log(result/10);//NaN - not a number ! • A variable must NOT start with a number X var 2s = "stringy“;// unexpected token ILLEGAL
  20. 20. Course – Javascript Step by Step 3rd Edition pdf 6/24/2015 20kofc809.org •You can: • read the book • download the code http://aka.ms/JavaScriptSbS/files
  21. 21. 6/24/2015 21kofc809.org Variable Names: Legal Reference: Javascript Step by Step 3rd Edition pdf Chapter 4 p. 52 http://www.ecma-international.org/ecma-262/6.0/index.html#sec-names-and-keywords • Variable names can contain  uppercase and lowercase letters as well as numbers.  The lowbar character ( _ )  The dollar sign character ($) • Variables cannot o X Start with a number o X contain spaces o X contain other punctuation . : ; / ! @ # % (and others too) o X Contain a Javascript keyword • Valid  var i; var $i;  var myVar;  var flag_1; • Invalid o X var 1stCounter;//no numbers first o X var new variable;//must not contain spaces o X var new.variable;//must not contain punctuation o X var var;//must not be a keyword
  22. 22. Course – codepen.io Variable Types 6/24/2015 22kofc809.org • codepen.io, NorthDecoder • http://www.ecma-international.org/ecma-262/5.1/#sec-8
  23. 23. 6/24/2015 23kofc809.org Variable: Types Reference: Javascript Step by Step 3rd Edition pdf Chapter 4 p. 41 http://www.ecma-international.org/ecma-262/5.1/#sec-8 • Variable types: o Undefined o Null o Booleans o Strings o Numbers o Objects o Command: var theTypeIs = typeof(aVariable); o Introduction to Javascript variables and types  http://codepen.io/NorthDecoder/pen/OVRQMG
  24. 24. git --local-branching-on-the-cheap 6/24/2015 24kofc809.org • http://git-scm.com/ try •Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. •Download
  25. 25. Engagement 6/24/2015 25kofc809.org • To make our meetup more personable I am inviting members to add links to their meetup.com introduction that directly references something related to Javascript or programming for example codepen.io or github.com.
  26. 26. That all folks ! 6/24/2015 26kofc809.org • Thank you for attending the meetup.

×