O'Reilly logo
live online training icon Live Online training

Learn to Program with JavaScript

Topic: Web & Mobile
Shaun Wassell

From its humble origins back in the dawn of the World-Wide Web, JavaScript has risen to become one of the most popular - if not the most popular - programming language on Earth. Over the past few years, it’s become possible to do pretty much anything using only Javascript: We can write entire front-end applications using React, Angular, or Vue. We can create JavaScript servers using Node.js. We can make JavaScript-driven desktop apps using Electron. We can even develop mobile apps in JavaScript using React Native. In other words, Javascript has become the sort of “common tongue” of the software development world, making it possible for a single developer with a single programming language to build programs that only a few years ago would have required an entire department.

The caveat is that, in order to take advantage of this power, you first have to know the basics of JavaScript. That’s where this course comes in. With the extensive changes that Javascript has undergone over the past few years, it can be difficult to know exactly what “the basics” are! What is this ES5/ES6/ES7 stuff? Do I run my code in a browser or through the command line? Is Javascript an Object-Oriented language or Functional language? And so on.

What you'll learn-and how you can apply it

  • A deep-dive into JavaScript’s sometimes unusual syntax
  • How to write and run JavaScript programs both in the browser and on a server
  • The latest syntax improvements in JavaScript and how to take advantage of them
  • The wider context of the JavaScript universe, including its advantages, quirks, and the many different JavaScript “dialects”

This training course is for you because...

  • You’re already familiar with another programming language and want to advance your career by learning JavaScript
  • You’re new to programming and want to learn JavaScript
  • You’ve used older versions of JavaScript, but are unfamiliar with the many changes that have taken place in JavaScript over the past few years

Prerequisites

  • This is an introductory course, so very little prior knowledge is necessary. It might still be helpful to have a basic knowledge of HTML and CSS.

Course Set-up

Recommended Preparation

Recommended Follow-up

  • Live Online Training: Functional Programming with JavaScript ES6+, by Shaun Wassell, Search the O’Reilly Learning Platform for an upcoming date
  • Live Online Training: Advanced Javascript, by Sahil Khosla, Search the O’Reilly Learning Platform for an upcoming date
  • Live Online Training: Full-Stack React: Build and Publish a Modern Web Application, by Shaun Wassell, Search the O’Reilly Learning Platform for an upcoming date

About your instructor

  • Shaun is a lifelong programmer and problem-solving addict. His goal is to help people build incredible software and solve meaningful problems by mastering the art of software development. He currently works as a Senior React Developer, but also has a lot of side gigs, including consulting, freelance development, and online education. Don’t hesitate to get in contact with him if you enjoy his materials.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Overall Introduction (5 minutes)

What Is JavaScript? (30 minutes)

  • Learn what you can do with JavaScript
  • Take a look at JavaScript’s features
  • Learn the pros and cons of JavaScript
  • Learn the JavaScript dialects and browser compatibility
  • Run code using a REPL
  • Learn Basic Syntax
  • Q&A

Learn the JavaScript Data Types (30 minutes)

  • Learn the Data types
  • Learn about JavaScript’s “Number” type
  • Learn about JavaScript’s “String” type
  • Learn about JavaScript’s “Boolean” type
  • Learn about JavaScript’s “Object” type
  • Learn about arrays in JavaScript
  • Learn about JavaScript’s “Function” type
  • Learn about JavaScript’s “Undefined” type
  • Learn about JavaScript’s “BigInt” type
  • Learn about JavaScript’s “Symbol” type
  • Q&A

Break (10 minutes)

Learn Basic JavaScript Control Flow (30 minutes)

  • Learn about equality in JavaScript
  • Learn about If statements in JavaScript
  • Learn about For Loops in JavaScript (For-in and For-of)
  • Learn about While Loops in JavaScript (while and do-while)
  • Handling and throwing errors in JavaScript
  • Learn about Switch-Case blocks in JavaScript
  • Learn about Ternary Operators in JavaScript
  • Block-scoping vs. Function-scoping
  • Q&A

Learn Object-Oriented Programming in JavaScript (20 minutes)

  • Learn about JavaScript classes
  • Using the “This” keyword in JavaScript
  • Q&A

Break (10 minutes)

Working with Objects and Arrays in JavaScript (20 minutes)

  • Use Built-in Object methods
  • Use Built-in Array methods
  • Q&A

Learn JavaScript ES6+ Syntax (30 minutes)

  • Write functions using Arrow syntax
  • Set default values for Function arguments
  • The Spread Operator
  • Use Object Destructuring to get Object properties
  • Use Interpolation to insert data into strings
  • Learn the Import and Export syntax
  • Q&A

Break (10 minutes)

Write and Run a JavaScript Program (20 minutes)

  • Learn about the app we’ll be writing
  • Write a JavaScript program for the browser
  • Move JavaScript to an external script
  • Install Node.js and NPM
  • Write a Node script
  • Use Babel to transpile code
  • Q&A

Work With Asynchronous Code in JavaScript (20 minutes)

  • Use callbacks to handle asynchronous operations
  • Learn about Promises
  • Use Async & Await to make asynchronous code readable
  • Q&A

Break (10 minutes)

Create a Web Server with JavaScript (20 minutes)

  • Learn the basics of writing a Node server
  • Create and set up a Node.js project
  • Create and run a basic Express server
  • Create and test a GET endpoint
  • Read a file with the “fs” package
  • Create and test a POST endpoint
  • Q&A

Learn JavaScript Best Practices (20 minutes)

  • Use ESLint to ensure code style
  • Ensure Immutability in your programs
  • Avoid Loops when working with arrays
  • Q&A

Summary (15 minutes)