<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ashton(tripple blocked, owns illendo)</title>
    <description>The latest articles on DEV Community by Ashton(tripple blocked, owns illendo) (@yeesterplus).</description>
    <link>https://dev.to/yeesterplus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1797570%2F044b319e-9b6d-44f7-95d0-046dabd92d21.png</url>
      <title>DEV Community: Ashton(tripple blocked, owns illendo)</title>
      <link>https://dev.to/yeesterplus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yeesterplus"/>
    <language>en</language>
    <item>
      <title>how to check if a value has changed in javascript webbrowser</title>
      <dc:creator>Ashton(tripple blocked, owns illendo)</dc:creator>
      <pubDate>Wed, 17 Jul 2024 20:03:30 +0000</pubDate>
      <link>https://dev.to/yeesterplus/how-to-check-if-a-value-has-changed-d6m</link>
      <guid>https://dev.to/yeesterplus/how-to-check-if-a-value-has-changed-d6m</guid>
      <description>&lt;p&gt;do&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var old = /*value*/
function loop(){
 if (/*value*/ != old){ //check if the value is not old
  //do stuff
 }
 old = /*value*/ //set old to value
 requestAnimationFrame(loop) //loop every frame
}
requestAnimationFrame(loop) //wait a frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var old = /*value*/
function changed(){
 var change = /*value*/ != old //check if the value is not old
 old = /*value*/ //set old to value
 return change //output change
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and replace &lt;code&gt;/*value*/&lt;/code&gt; with the value to check :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
