JavaScript Gotchas and Common Mistakes

Learn to avoid the most common and sometimes subtle JavaScript errors and write robust code.
5.0 (2 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
77 students enrolled
$20
Take This Course
  • Lectures 42
  • Contents Video: 1.5 hours
    Other: 27 mins
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 3/2015 English

Course Description

Save time by avoiding common JavaScript mistakes

JavaScript is easy and popular. But JavaScript also lets you make costly mistakes! This course is tailored for beginner JavaScript developers who want to avoid errors even seasoned developers make! If you take this course, you will avoid bugs that would take hours or even days to catch.

Write robust code like a pro

This course covers over 20 JavaScript gotchas. Some are common and easy. But others are ignored even by professional JavaScript developers.

For each mistake, you will go through a straightforward, comprehensive and fun explanation of the problem and the solution. Each JavaScript gotcha presentation contains:

* Clear example of the error
* Live demo of the problem and the solution
* Prescriptive guidance
* Downloadable code samples and reference material

It's time to write robust JavaScript code and do it the right way. Let's get started!

What are the requirements?

  • You should already be familiar with the JavaScript syntax
  • You'll need a browser and a text editor (recommended editors are covered in section 1)

What am I going to get from this course?

  • Use callbacks and keep the current context
  • Avoid bugs in array manipulation (add, remove, iterate over items)
  • Choose when to use var and when not to
  • Validate numeric user input
  • Decide when to use null versus undefined
  • Handle missing parameters
  • Use tools to automatically detect JavaScript errors

What is the target audience?

  • This course is meant for any JavaScript developer who wants to avoid common JavaScript errors. This is not an introduction to JavaScript but you'll need only minimal knowledge of JavaScript to benefit.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: [Intro] Introduction and welcome
What are JavaScript gotchas?
Preview
02:20
Enable HD
Preview
00:13
Student expectations and software
Preview
01:10
Section 2: [Syntax] Problematic Syntax
Gotcha: A good return
03:38
Multi-line
1 question
Lab: return
Article
Gotcha: Switch and break
03:28
switch
1 question
Lab: switch
Article
Gotcha: Blocks
Article
Section 3: [Values] Trouble between numbers and strings
Gotcha: The old parseInt()
06:16
parseInt()
3 questions
Lab: parseInt()
Article
Gotcha: A bad date
02:22
date
2 questions
Lab: date
Article
Gotcha: Number imprecision
03:22
Lab: number precision
Article
Gotcha: Not a number is a number
06:19
NaN
3 questions
Lab: NaN
Article
Gotcha: + doesn't add up
05:57
+
7 questions
Lab: +
Article
Section 4: Equal, null and undefined
Gotcha: When equality changes things
03:03
Lab: = vs. ==
Article
Gotcha: More equality is better
03:39
== vs ===
8 questions
Lab: == vs. ===
Article
Gotcha: null is not undefined
Preview
06:02
Section 5: [Arrays] That Array is full of trouble
Gotcha: forEach for everyone
02:54
array loops
2 questions
Lab: array loops
Article
Gotcha: push your array
02:42
Array.length
3 questions
Lab: array.length
Article
Gotcha: splice, don't delete
04:17
Lab: array delete
Article
Gotcha: Sorting out Array.sort
05:24
Array.sort
2 questions
Lab: Array.sort
Article
Gotcha: Arrays vs. dictionaries
03:40
arrays vs. dictionaries
2 questions
Lab: arrays vs. dictionaries
Article
Section 6: [Functions] Disfunctional Functions
Gotcha: Missing the argument
02:12
Lab: missing parameters
Article
Section 7: [var] Variables gone awry
Gotcha: var makes a difference
08:00
Lab: missing var
Article
Gotcha: Global conflict
02:59
Lab: Global conflicts
Article
Variables
1 question
Section 8: [This] This is not what it seems
Gotcha: this and that
09:39
this and that
1 question
Lab: this
Article
Section 9: [Conclusion] Thanks and goodbye!
Gotchas Summary PDF
Preview
22 pages

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Pierre Nallet, Software developer and trainer

Pierre is a software developer, course author and instructor. He spends his time writing software for clients and training software teams.

He has taught over 100 week-long training courses to software development teams throughout the world. He also authored training courses on WPF, WCF, security, MongoDB and Python classes.

He is an expert in .NET technology (C#, WPF, distributed systems, entity framework) and has delivered software for financial companies and healthcare startups.

He is also versed in web programming from ASP.NET backend with MongoDB storage to JavaScript and TypeScript front ends. Most recently, he was working on front end applications at Square.

Ready to start learning?
Take This Course