DEV Community

Walktheworld
Walktheworld

Posted on

Key Takeaways From My First JS Project

Asynchronous requests allow our code to multi-task.

A fetch() request has three statuses; Promise, Response, & Error.

-The promise is the HTML API source.

-The Response is the data from the source.

-Error occurs when no response is returned.

An EventListener takes an action ("click", "submit") and a callback function written as arrow function (()=>{}).

Function() should only be used when it is the start of the code otherwise ES6 is standard (i.e arrow function).

Know your data!

When you change one thing make sure you go through and restructure anything else that references that original location where the change was made. I found myself iterating through one object over and over again with a forEach statement, which I had written initially for an API with multiple objects.

Know your code!

Alt Text

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

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

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

Okay