diff --git a/content/til/2024-09-06.md b/content/til/2024-09-06.md new file mode 100644 index 0000000..7e8021c --- /dev/null +++ b/content/til/2024-09-06.md @@ -0,0 +1,17 @@ +--- +{ +.title = "Javascript's Array.from is neat!", +.date = @date("2024-09-06T00:00:00"), +.author = "koehr", +.draft = false, +.layout = "til.html", +.description = "", +.tags = [], +.custom = {}, +} +--- +Because it simply executes a function arg1.length times, one can do things like: + +```ts +const randomNumbers = Array.from({ length: 75 }, Math.random) +``` diff --git a/zig-out/til/2024-09-06/index.html b/zig-out/til/2024-09-06/index.html new file mode 100644 index 0000000..4a7d507 --- /dev/null +++ b/zig-out/til/2024-09-06/index.html @@ -0,0 +1,128 @@ + + + + + + the codeartist — programmer and engineer based in BerlinJavascript's Array.from is neat! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Javascript's Array.from is neat!

+ +
+ Last updated: +
+ +

Because it simply executes a function arg1.length times, one can do things like:

const randomNumbers = Array.from({ length: 75 }, Math.random)
+
+
+ +
    +
  1. +
+ +
+ +
+ + + + + + + diff --git a/zig-out/til/index.html b/zig-out/til/index.html index 2f99e22..d7c8caa 100644 --- a/zig-out/til/index.html +++ b/zig-out/til/index.html @@ -59,6 +59,12 @@
  1. + +
    + Javascript's Array.from is neat! + (source) +
    +
    Reading speed is usually from 100 to 260 words per minute