<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Javascript on scriptable.com</title><link>https://scriptable.com/categories/javascript/</link><description>Recent content in Javascript on scriptable.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 24 Jul 2026 10:52:12 -0400</lastBuildDate><atom:link href="https://scriptable.com/categories/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Create a JavaScript Module (Node and Browser)</title><link>https://scriptable.com/posts/javascript/how-to-create-a-javascript-module-nodejs-browser/</link><pubDate>Fri, 24 Jul 2026 10:52:12 -0400</pubDate><guid>https://scriptable.com/posts/javascript/how-to-create-a-javascript-module-nodejs-browser/</guid><description>A JavaScript module is a file that exports values other files import by name. ES modules (import/export) are the standard form and run unchanged in modern browsers and Node.js. This tutorial builds a…</description></item><item><title>How to Create a Random Boolean Function in JavaScript (Node and Browser)</title><link>https://scriptable.com/posts/javascript/how-to-create-a-javascript-random-boolean-function-nodejs-browser/</link><pubDate>Fri, 24 Jul 2026 10:52:12 -0400</pubDate><guid>https://scriptable.com/posts/javascript/how-to-create-a-javascript-random-boolean-function-nodejs-browser/</guid><description>A random boolean — a coin flip that returns 1 or 0 about half the time — is the smallest building block for simulations and generative art. The function is one line; the useful part is confirming it…</description></item><item><title>How to Create a Weighted Random Function in JavaScript (Node and Browser)</title><link>https://scriptable.com/posts/javascript/how-to-create-a-javascript-weighted-random-function-nodejs-browser/</link><pubDate>Fri, 24 Jul 2026 10:52:12 -0400</pubDate><guid>https://scriptable.com/posts/javascript/how-to-create-a-javascript-weighted-random-function-nodejs-browser/</guid><description>A fair coin flip returns true half the time. A weighted coin flip returns true a chosen fraction of the time — 10%, 25%, whatever the simulation or generative-art piece needs. The function is one…</description></item><item><title>How to Select a Random Item from a JavaScript Array (Node and Browser)</title><link>https://scriptable.com/posts/javascript/how-to-select-a-javascript-random-array-item-nodejs-browser/</link><pubDate>Fri, 24 Jul 2026 10:33:30 -0400</pubDate><guid>https://scriptable.com/posts/javascript/how-to-select-a-javascript-random-array-item-nodejs-browser/</guid><description>Picking a random element from an array comes up constantly: rolling dice, shuffling prompts, choosing a color. The whole job is one line of JavaScript, but the interesting part is proving it behaves…</description></item></channel></rss>