25 lines
420 B
JavaScript
25 lines
420 B
JavaScript
// skeleton.js
|
|
|
|
document.addEventListener('DOMContentLoaded', function initJs () {
|
|
console.log('Hello, world!')
|
|
})
|
|
|
|
|
|
|
|
// skeleton-script.js
|
|
|
|
#!/usr/bin/env bun
|
|
|
|
// See: https://bun.sh/docs/runtime/shell
|
|
|
|
import { $ } from "bun";
|
|
|
|
const lines = $`ls`.lines()
|
|
|
|
for await (let line of lines) {
|
|
console.log(line);
|
|
}
|
|
|
|
const lineArray = await Array.fromAsync(lines)
|
|
console.log(lineArray.filter(s => s.startsWith("D")))
|