Videos / Web Dev
Episode 2 of 9 · The interview course
JavaScript interview: types, coercion and equality Included with a plan
This video is included with a plan. The first three lessons of every track are free, with their boards and videos. A plan unlocks every lesson, board, video, lab and paper for one price.
View plans → Already a member? Sign in
Chapters
How many types are there 0:00 The seven primitives 0:16 Typeof, in full 0:35 Typeof null is a bug 0:52 Two different nothings 1:08 Undefined against null 1:25 What makes not a number 1:45 The only value unequal to itself 2:03 Testing for it, correctly 2:18 Object.is, the third one 2:32 Why floats disagree 2:49 The eight falsy values 3:07 Or against nullish 3:24 Implicit and explicit 3:42 Plus is two operators 4:00 The other operators disagree 4:15 ParseInt and its radix 4:33 Plus with arrays and objects 4:49 Strict against abstract 5:07 The four rules that matter 5:27 Equality is not transitive 5:43 Null against zero 6:03 The showpiece 6:20 Arrays becoming primitives 6:37 The wrapper, loosely 6:56 The wrapper, strictly 7:14 Two wrappers, still false 7:31 Why boxing exists 7:49 Delete leaves a hole 8:04 Holes, and what skips them 8:20 Which check when 8:37 A reference, not a value 8:57 Why two identical objects differ 9:11 The stringify shortcut 9:26 The three ways it lies 9:44 Writing deep equal 10:02 Copying, shallowly 10:18 Where shallow bites 10:35 A real deep copy 10:52 Which array methods mutate 11:13 Symbol, WeakMap, null prototype 11:30 Map against forEach 11:47 Neither one can be stopped 12:03 Filter, find, some, every 12:18 When reduce is the answer 12:36 Sort sorts as strings 12:51 The worked example: map 13:09 The worked example: filter, reduce 13:26 The worked example: sort, group 13:44 The one rule 13:59 JavaScript interview: types, coercion and equality. Two days from an interview, and this question opens most of them. How many types does JavaScript have. Eight. Seven primitives and one object type. Say the number first, then the l
Mark as watched Saved in this browser only.