Guide: Javascript Introduction - Fundamentals & Data Types
Description
👉 This guide is part of the Javascript Introduction Guides. Please follow the order:
- Fundamentals & Data Types
- Conditionals
- Loops & Iterators
- Functions
- ES6
After working on various other guides you probably have stumble on Javascript, maybe even before you started the course. In any case, now is the time to set time apart to dive in the most fundamental concepts aspects of this language and learn them well so you can feel confident about expanding your knowledge about it, step-by-step.
Javascript is the only programming language that all the browsers understand, therefore it is a building block of web development. With it you will be able to add “behavior” to your websites and applications, such as interaction, data collection, programmatic interface changes based on the user's behavior and (this is very important) create HTTP requests which allow you to create asynchronous applications! 😍 Don't worry if you don't understand some of these terms. That is precisely what this and the Javascript Introduction Guides are for.
A lot of the time Javascript is used in conjunction with HTML and CSS, but it actually does not need any of them. Javascript can function on its own. The browsers add something called Web APIs, which (in short) allows you to use Javascript to manipulate HTML and CSS, but in order to get there it's a good idea to understand what “pure” Javascript can do.
To do that, you will use Rep.it, which is a platform that, among other things, allows you to try typing commands in Javascript and see the results. See an example: https://repl.it/languages/nodejs
Once you are comfortable with all the concepts listed in this and the other introduction Guides, a world of concepts and exciting possibilities will open-up before you!
Knowledge
- Understand what is a programming language
- Understand what is Javascript
- Understand how can Javascript work with and without the browser
- Understand what data types are
Skills
- Be able to use variables and other basic constructs of Javascript
- Be able to do operators with different data types in Javascript
Topics
- Fundamentals
- Comments
- Output (console.log, alert, innerHTML)
- Variable declaration (var/let, const)
- Assignment
- Data Types
- Numbers
- Arithmetic Operations
- Strings
- Concatenation & Interpolation
- Template Literals
- Boolean
- Truthy/Falsy
- If/Else introduction
- Arrays
- Zero-based indexes
- length
- sort()
- Objects
- Syntax
- Dot notation
- Add properties
- Remove properties
- Destructuring assignment
- Shorthand Property Name syntax const x = { myProp }
- Null / Undefined / NaN
- Math (random, round, floor)
- Dates (Set, Get, Format)
- Numbers
Action Points
- Find and take a Javascript crash course
- Experiment with all listed topics in Repl.it
Deliverable: Usage examples
- Submit:
- Repl.it Project URL (Javascript Repl)
- Add comments for each relevant code block
- Minimum requirements:
- All examples must contain comments explaining that code block
- Demonstrate variables assignments
- Output the result of arithmetic operations
- Output the result of string concatenations
- Demonstrate the usage of if statements to check for truthy or falsy values
- Create array with multiple values
- Output one of the items
- Output the number of items in that array, programmatically
- Demonstrate how to
- Create an object
- Add properties to it
- Remove properties from it
- Output specific properties
- Demonstrate at least one Math method
- Output the date and time of opening of the file using Date()
- Use strict mode
- Output results should be done with console.log()
- Showing results via DOM manipulation is not required but is welcome and would replace the use of console.log()
- Theme ideas:
- Create a contact list (array) containing some people (objects with different kinds of properties) and demonstrate the requirements using this list.