Category

JavaScript Tutorials

JavaScript tutorials covering ES features, DOM manipulation, async/await, arrays, functions, frameworks, and the patterns every modern web developer should know.

53
Total Tutorials
12
New this month
Showing 12 of 53 · page 3 of 5
Call the OpenAI API from Vanilla JavaScript (No Backend)
JavaScript
13 min
May 21, 2026
Call the OpenAI API from Vanilla JavaScript (No Backend)
You do not need Node.js, React, or a backend server to start using the OpenAI API. This tutorial shows you how to call GPT models directly from plain JavaScript using the Fetch API — with streaming, error handling, and secure key management.
W
W3Tweaks Team
JavaScript API Call: fetch, Axios, TanStack Query & ky
JavaScript
18 min
Jul 26, 2023
JavaScript API Call: fetch, Axios, TanStack Query & ky
Most JavaScript API call guides are still in 2023 — fetch + Axios + XMLHttpRequest + jQuery. The real modern comparison is fetch + async/await + AbortController (the modern baseline), Axios (still popular for interceptors), TanStack Query (the React standard), and ky/ofetch (lightweight replacements). Plus the 4xx/5xx error gotcha fetch doesn't reject for, the Axios CancelToken deprecation, type-safe APIs with Zod, and FormData uploads done right.
W
W3Tweaks Team
YouTube Data API in JavaScript: List Channel Videos
JavaScript
16 min
Feb 14, 2023
YouTube Data API in JavaScript: List Channel Videos
Most 'list YouTube channel videos' tutorials use jQuery + the search.list endpoint — that costs 100 quota units per call (vs 1 for the uploads-playlist trick) and exposes your API key in the browser. This guide does it right: modern fetch + async/await, the playlistItems.list pattern, server-side API key proxying with Cloudflare Workers or Next.js Route Handlers, channel handle → ID resolution, pagination with nextPageToken, and the oEmbed fallback for simple embeds without any API key at all.
W
W3Tweaks Team
JavaScript Primitive and Non-Primitive Data Types
JavaScript
2 min
Feb 8, 2023
JavaScript Primitive and Non-Primitive Data Types
W
W3Tweaks Team
JavaScript Conditional Statements: A Guide to Writing Better Code
JavaScript
3 min
Feb 6, 2023
JavaScript Conditional Statements: A Guide to Writing Better Code
W
W3Tweaks Team
25 JavaScript String Methods
JavaScript
6 min
Oct 25, 2022
25 JavaScript String Methods
W
W3Tweaks Team
24 Most important JavaScript methods
JavaScript
9 min
Oct 23, 2022
24 Most important JavaScript methods
W
W3Tweaks Team
Top javascript Array Methods with Examples
JavaScript
2 min
Oct 17, 2022
Top javascript Array Methods with Examples
W
W3Tweaks Team
Navigator.sendBeacon() is great method in JavaScript
JavaScript
1 min
Mar 17, 2022
Navigator.sendBeacon() is great method in JavaScript
W
W3Tweaks Team
JavaScript Short Circuiting: What It Is and How To Use It
JavaScript
1 min
Sep 24, 2021
JavaScript Short Circuiting: What It Is and How To Use It
W
W3Tweaks Team
Learn how to extract phone numbers from string in JavaScript
JavaScript
2 min
Sep 8, 2021
Learn how to extract phone numbers from string in JavaScript
W
W3Tweaks Team
9 D3.js Patterns & Templates
JavaScript
2 min
May 16, 2020
9 D3.js Patterns & Templates
W
W3Tweaks Team