JavaScript Basics Stephen Delaney sdelaney@skokielibrary.info
Review: Making Decisions with Conditional Statements Comparison operators Boolean values If statements The conditional challenge
Comparison Operators Operator Meaning True expressions == Equality 10 == '10' === Strict equality (2 * 5) === 10 != Inequality 9 != 10 !== Strict inequality '10' !== 10 > Greater than 20 > 10 >= Greater than or equal '10' >= 10 < Less than 10 < 30 <= Less than or equal '10'<= 10
And Operator: && Condition 1 Condition 2 Result TRUE FALSE
Or Operator: || Condition 1 Condition 2 Result TRUE FALSE
Not Operator: ! Condition Result TRUE FALSE
If Statements
Questions?
What’s next?
JavaScript Library JavaScript Framework A toolkit Abstracts different layers (pre-written code) Simplifies your coding experience JavaScript Framework A given structure of "how" you should present your code A code template Source: http://stackoverflow.com/questions/11576018/what-is-the-difference-between-a-javascript-framework-and-a-library
JavaScript Library JavaScript Framework Angular Backbone Express Ember jQuery Angular React Backbone D3.js Express Bootstrap Ember Foundation Meteor Underscore.js
Next Steps jQuery jQuery is used by 71.8% of all websites. That is a JavaScript library market share of 96.4%. https://w3techs.com/technologies/overview/javascript_library/all
Next Steps AJAX Asynchronous JavaScript And XML Get data without a page refresh https://w3techs.com/technologies/overview/javascript_library/all
Next Steps MEAN stack “In the MEAN stack, we use MongoDB as our database. We write most of our code in Javascript. We rely on Node and Express.js to host our application and serve APIs/Views. We use AngularJS to render our views that are served by Express.”
Next Steps MEAN stack
Fortunately, Treehouse!
Navigate to library: Sort by difficulty Select course Select JavaScript https://teamtreehouse.com/library/topic:javascript/type:course/sort:difficulty
Recommended Syllabus JavaScript Loops, Arrays and Objects JavaScript and the DOM jQuery Basics There is also a shorter one called Introduction to jQuery. AJAX Basics
Recommended Syllabus Interactive Web Pages with JavaScript Object-Oriented JavaScript Node.js Basics Build a Simple Dynamic Site with Node.js Express Basics Build a REST API With Express Mongo Basics* Angular Basics* Building a MEAN Application *Indicates a course that is not under JavaScript Application program interface (API) Representational state transfer (REST) Create, read, update, destroy (CRUD) http://softwareengineering.stackexchange.com/questions/120716/difference-between-rest-and-crud
Trust the process.
Next Week – Final Class Creating Reusable Code with Functions Creating functions Returning values from functions Variable scope We will do a full review next week!