From 2e916d51119586f5577c77dc804b7bbe9e001724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20K=C3=B6hring?= Date: Fri, 6 Sep 2024 13:33:13 +0200 Subject: [PATCH] update TIL --- content/til/2024-09-06.md | 17 ++++ zig-out/til/2024-09-06/index.html | 128 ++++++++++++++++++++++++++++++ zig-out/til/index.html | 6 ++ 3 files changed, 151 insertions(+) create mode 100644 content/til/2024-09-06.md create mode 100644 zig-out/til/2024-09-06/index.html 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