<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2026-10-16T12:27:48Z</updated>
  <generator>https://njump.me</generator>

  <title>Nostr notes by WebFinds</title>
  <author>
    <name>WebFinds</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://njump.me/npub1xqnd2r3hlnca57dhrsv9ednyn8xtc6zkm47ymnujjnaws8nrgegs39tula.rss" />
  <link href="https://njump.me/npub1xqnd2r3hlnca57dhrsv9ednyn8xtc6zkm47ymnujjnaws8nrgegs39tula" />
  <id>https://njump.me/npub1xqnd2r3hlnca57dhrsv9ednyn8xtc6zkm47ymnujjnaws8nrgegs39tula</id>
  <icon>https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f578.png</icon>
  <logo>https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f578.png</logo>




  <entry>
    <id>https://njump.me/nevent1qqsr3fhcg5lgu06t0whg8l9xtsxsvdgze5xkqz0xn0ed7uaqxhvca4czyqczd4gwxl70rknekuwpsh9kvjvue0rg2mwhcnw0j22046q7vdr9z00wc5d</id>
    
      <title type="html">What’s the value of b after the following code runs? let a = ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsr3fhcg5lgu06t0whg8l9xtsxsvdgze5xkqz0xn0ed7uaqxhvca4czyqczd4gwxl70rknekuwpsh9kvjvue0rg2mwhcnw0j22046q7vdr9z00wc5d" />
    <content type="html">
      What’s the value of b after the following code runs?&lt;br/&gt;let a = 10;&lt;br/&gt;let b = a;&lt;br/&gt;a = 0;&lt;br/&gt;It’s 10. Even though I had gotten it right, I couldn’t have explained why.&lt;br/&gt;Dan Abramov and Maggie Appleton’s course, Just JavaScript, helped me develop a better mental model of how it works and now it’s free to access for everyone.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://arpit.blog/notes/2026/10/just-javascript/&#34;&gt;https://arpit.blog/notes/2026/10/just-javascript/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;#maggieappleton #danabramov #even #javascript&lt;br/&gt;&lt;br/&gt;#rss #feeds #linksharing #qwibbit
    </content>
    <updated>2026-10-23T08:31:17Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsq75cdlf9xjay7pdhuu642f3v6p6tz2vns8hmcph0vauw2y4a62sqzyqczd4gwxl70rknekuwpsh9kvjvue0rg2mwhcnw0j22046q7vdr9zn6gv2r</id>
    
      <title type="html">Inline rendering with document.currentScript Today I learned ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsq75cdlf9xjay7pdhuu642f3v6p6tz2vns8hmcph0vauw2y4a62sqzyqczd4gwxl70rknekuwpsh9kvjvue0rg2mwhcnw0j22046q7vdr9zn6gv2r" />
    <content type="html">
      Inline rendering with document.currentScript&lt;br/&gt;&lt;br/&gt;Today I learned about document.currentScript thanks to Lean Rada.&lt;br/&gt;Using document.currentScript with the replaceWith() method, the footer can update itself and fix one of the most common problems on the web: a stale copyright year.&lt;br/&gt;&amp;lt;footer&amp;gt;&lt;br/&gt;©&lt;br/&gt;&amp;lt;noscript&amp;gt;2026&amp;lt;/noscript&amp;gt;&lt;br/&gt;&amp;lt;script&amp;gt;&lt;br/&gt;document.currentScript.replaceWith(new Date().getFullYear());&lt;br/&gt;&amp;lt;/script&amp;gt;&lt;br/&gt;&amp;lt;/footer&amp;gt;&lt;br/&gt;As mentioned on MDN, document.currentScript returns the &amp;lt;script&amp;gt; element whose script is currently being processed and isn’t a JavaScript module.&lt;br/&gt;So when the above script runs, the document.currentScript returns the script element. However, a script can only change the page when it explicitly touches the DOM, so we use the replaceWith() method. It swaps the returned script element for the year.&lt;br/&gt;Before I learned about document.currentScript, I would have used a templating language and set up a cron job to rebuild the site every 1st Jan. Or I would have used the textContent property, which needs an id or a selector to find the element. document.currentScript is much more convenient since it already knows where it is.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://leanrada.com/notes/inline-rendering-currentscript/&#34;&gt;https://leanrada.com/notes/inline-rendering-currentscript/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;#rss #feeds #linksharing #qwibbit
    </content>
    <updated>2026-10-20T03:22:45Z</updated>
  </entry>

</feed>