DEV Community

Margaret W.N
Margaret W.N

Posted on

2 1

Day 79: Eloquent Javascript

Alt Text

Today was different. I started reading a book on javascript: Eloquent Javascript. This is the first technical book in my short history of web development. I learned a couple of new concepts, quoted below:

Type coercion

When an operator is applied to the “wrong” type of value, JavaScript will quietly convert that value to the type it needs, using a set of rules that often aren’t what you want or expect.

For those of us like me that omit semicolons for no apparent reason.

In some cases, JavaScript allows you to omit the semicolon at the end of a statement. In other cases, it has to be there, or the next line will be treated as part of the same statement. The rules for when it can be safely omitted are somewhat complex and error-prone.

I'll stop omitting semicolons

A Call stack - a stack data structure that stores information about the active subroutines of a computer program.

Every time a function is called, the current context is stored on top of this stack. When a function returns, it removes the top context from the stack and uses that context to continue execution.

I am loving the book, I was really contemplating whether to read or not but after the first three chapters I'm positive that it is worth my time.

Thats it for Day 79
I'll be back tomorrow with more concepts learnt from the book

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay