Live JavaScript

Live JavaScript

Let's Start!

Do you want to really know JavaScript?

Did you ever wanted to learn JavaScript, but never had the chance to see what is it about?

Did you watch a bunch of videos about JavaScript, but when its time to write some code, everything is kind of confusing?

Did you read a book or two about JavaScript, but got sidetracked in endless details you don't care about?

Do you feel you should know JavaScript by now, but still find yourself browsing StackOverflow for trivial how-tos?

Do you have any clue about what good JavaScript code is? And how to avoid foot guns?

Then you are in the right place. This course will make things clear for you.

No matter what you're using

How this works?

It's just you and a code editor

No videos, no lengthy texts.

Each lesson has a big upfront comment. It explains what is the lesson about, how a particular feature works or what you have to do.

Then, there is a piece of code that shows the feature in action. The code executes on the fly and is editable. You should tinker with it to better understand how it works.

Finally, there are exercises, use the knowledge gained in the lesson to solve them.

In browser storage

Experiment freely. Code changes and preferences are saved in your browser, nothing is sent over the network.

Infinite loop protection

Code executes while you're typing it. So is possible to reach an infinite loop state, e.g. when using while or for loop. Don't worry, the code execution will stop and the browser will not block.

Light & Dark themes

Do you prefer a light or a dark theme? We got you covered in both cases.

A / B Quizzes

Every few lessons, a simple quiz will wait for you. You answer a question by choosing one of two pieces of code, the correct one or the wrong one.

Boss Challenges

If you could accept some challenges... That would be great!

Small Projects

In which you are given the complete source code of a small project. Like "Hangman" game, "No more secrets" effect or "Sprite map generator" algorithm.

Table of Contents

  1. What is JavaScript?It's a Long Way to the Top (If You Wanna Rock 'n' Roll)
  2. Just a bit of historyThe root of all evil
  3. How it feels to write JavaScript?The Good, the Bad and the Ugly
  4. use strictI Have No Mouth, and I Must Scream
  5. Code CommentsCan anybody tell me what's going on?
  6. LoggingOne thing I do know, that though I was blind, now I see
  7. FunctionsA very short intro
Basic JavaScript
  1. ValuesLet there be data
  2. BindingsThe Life of a Kraken
  3. Dynamic TypesA Mind Forever Voyaging
  4. Value is boundObvious is not?
  5. NamesRemember when everyone used to call you Stinky Pete?
  6. KeywordsI want you to notice when I am around
  7. Data typesRoyale with Cheese
  8. Numb3rsOne-two-three-techno
  9. MathIt's the Final Countdown
  10. StringsWords don't come easy
  11. Working with stringsTell me a story of whiskey and mystics and men
  12. Boss request: Media durationThat would be great!
  13. BooleansThe Truth, The Whole Truth and Nothing But The Truth
  14. Empty valuesButthole Surfers
  15. SymbolNo clones allowed
  16. Quiz ShowLet the games begin!
  17. OperatorsParanoid androids
  18. Automatic type conversionThe principle of most astonishment
  19. Plus operatorLet's come together
  20. Avoid automatic type conversionAll are equal, but some are more equal than others
  21. Logical operatorsI want it all, I want it now
  22. How to check for typeWhat are you?
  23. Flow controlShortcut this way
  24. SemicolonsShould I stay or should I go?
  25. Boss request: Random numberThat would be great!
  26. ChecksWait, who are you again?
  27. Loops99 bottles of beer on the wall
  28. Bit level operatorsWhen crazy fast is more important than maintenance
  29. Quiz ShowLet the games begin!
  30. FunctionsBelow the surface of the machine, the program moves
  31. Declaration notationThe hoist of the century
  32. Arrow functionsTake me down to the Paradise city
  33. Function argumentsCareful with that axe, Eugene
  34. Quiz ShowLet the games begin!
  35. Project: Hangman
  36. ObjectsFrom the small and trivial, the large and complex arise.
  37. Objects are mutableFire Walk with Me
  38. Working with mutable objects is complicatedBurning down the house
  39. Primitive types are not objectsLooks like a duck, and quacks like a duck, still not a duck
  40. Use objects as primitivesI have a use for you
  41. Functions are objectsHere we are now, entertain us
  42. Spread and destructuring objectsI need more details
  43. MapsAlternative to plain objects
  44. ArraysIf I have a bag of rocks to carry as I go
  45. Immutable array operationsCan you give me sanctuary?
  46. Spread arraysWho Let The Dogs Out?
  47. Strings to arrays and backOne of these days, I'm going to cut you into little pieces
  48. Arrays are objectsSometimes I feel I'm gonna break down and cry
  49. SetsHolding unique values
  50. Boss request: Collect unique chars from stringsThat would be great!
  51. Regular expressionsA language inside a language
  52. JSONMessage in a bottle
  53. DatesNever seem to find the time
  54. ErrorsUh, Houston, we've had a problem
  55. AsynchronicityWaiting... Waiting... Waiting for you to come along
  56. ClassesMusic for the Masses
  57. Classic ModulesBrothers In Arms
  58. ES ModulesHabemus papam
Advanced JavaScript
  1. A number is 64 bits9007199254740991
  2. ScopesAll in all it's just another brick in the wall
  3. Function scopeThrough the Looking Glass
  4. Execution context and the call stackWelcome to the machine
  5. ClosuresDragged by the force of some inner tide
  6. Dissection of a closure
  7. Other closure examples
  8. Project: No more secrets
  9. Constructors and PrototypesThe secret life of objects
  10. Prototype based InheritanceThe tree of life
  11. Syntactic Sugar over PrototypesAwww that's so sweet
  12. Cloning objectsHail to the hordes
  13. Function context'This' is a problem
  14. IteratorsOne by one, step by step
  15. GeneratorsDon't stop me now ('cause I'm having a good time)
  16. Project: Sprite map generator
  17. ProxiesIt's a trap!
  18. JavaScript in 6 charactersThe lunatic is on the grass

My name is Rares Portan. I am a professional software developer for more than 20 years.

Most of these years, I've been programming in JavaScript. And I still enjoy doing that.

I love simple and straight code that creates fast and reliable software. Maybe too much.

Thanks for your time.