JavaScript Posts (19)

Tutorials and practical guides on JavaScript — from closures and async patterns to browser APIs and Node.js tips.

Friday 20/02/2026

· 12 min read

Build a Multi-Step AI Agent with Tool Use in TypeScript

Build a TypeScript AI agent that calls tools, chains decisions, and solves multi-step tasks using Claude's tool_use API — full working agent loop included.

AIJavaScript

Wednesday 18/02/2026

· 12 min read

How to Handle AI API Rate Limits and Errors in Production (TypeScript)

Production-ready TypeScript patterns for handling AI API rate limits — exponential backoff, request queues, token budgets, and graceful degradation you can copy-paste.

AIJavaScript

Tuesday 17/02/2026

· 8 min read

Building an AI Code Review Bot with Claude and GitHub Actions

Build a GitHub Action that automatically reviews pull requests using Claude — complete working workflow YAML and TypeScript script you can add to any repo.

AIJavaScript

Friday 13/02/2026

· 8 min read

How to Add AI Search to Any Website with Embeddings and Supabase

Add AI-powered semantic search to your website using OpenAI embeddings and Supabase pgvector — full working TypeScript example with a React frontend.

AIJavaScript

Wednesday 11/02/2026

· 11 min read

Claude vs OpenAI API: A Practical Comparison for JavaScript Developers

A side-by-side code comparison of the Claude API vs OpenAI API for JavaScript developers — streaming, tool use, vision, and pricing math with real TypeScript examples.

AIJavaScript

Monday 09/02/2026

· 8 min read

How to Stream Claude API Responses in a Next.js App (With Full Code)

Learn how to stream Claude API responses token-by-token in a Next.js app using the Anthropic TypeScript SDK and Server-Sent Events. Full working code included.

AIJavaScript

Monday 09/02/2026

· 9 min read

Build a RAG Chatbot in 100 Lines of TypeScript

Build a RAG chatbot in TypeScript that answers questions about your own documents using the Anthropic SDK and a vector database — no LangChain, no bloated frameworks.

AIJavaScript

Tuesday 09/08/2022

· 1 min read

How to remove element from array

we can change the length of the array Array.pop() will remove the last element and return it Array.shift() will remove the first element and return it Array....

JavaScript

Monday 08/08/2022

· 1 min read

Cons of using React context

The biggest con when using React context is it may lead to performance issues. It is rerendering all the components that under the context provider each time...

JavaScript

Sunday 07/08/2022

· 1 min read

What are JS data types

These are the JS data types: Number String Boolean Object Undefined

JavaScript

Saturday 06/08/2022

· 1 min read

Access to element with ID

If you set ID on html element, you can access it inside your script directly The output in the console will be: It makes the code more complex if you use thi...

JavaScript

Tuesday 02/08/2022

· 1 min read

How to return tuple in typescript

We can do something like this:

JavaScript

Monday 01/08/2022

· 1 min read

Simple object validation

You can use Proxy to add simple validation to your objects. Example: This is very basic implementation but you can go pretty wild with it.

JavaScript

Sunday 31/07/2022

· 1 min read

Why to use pnpm

NPM / YARN are great package managers BUT PNPM is better. PNPM is faster than NPM / YARN PNPM uses symlinks instead of copying the dependencies security pnpm...

JavaScript

Wednesday 27/07/2022

· 1 min read

How to implement map function

For implementing arr.map() we will have to create new function on the Array.prototype. Then we will loop over array that the method was called on and finally...

JavaScript

Sunday 24/07/2022

· 1 min read

Implement isPalindrome in JS

To implement isPalindrome function we can achieve it by implementing another helper function reverseStr(). split('') will separate every char to array elemen...

JavaScript

Saturday 23/07/2022

· 1 min read

Connect google analytics to Next.js App

I assume that you already create your google analytics property and now you want to connect it to your Next.js app. Let's open \app file and Then we will get...

JavaScript

Friday 22/07/2022

· 1 min read

Serve app on port 80 using Nginx

This example was tested on ubuntu machine but should work the same on any linux distribution. First of all you need to install nginx: Then we need to remove ...

JavaScript

Friday 22/07/2022

· 2 min read

Create-nextjs-pwa

This are the steps to create pwa with nextjs install next-pwa create manifest.json this file tells the progressive web app how to behave on dektop or mobile....

JavaScript