Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

loop localstorage

    const re = /[a-zA-Z]/g;

    Object.keys(localStorage).forEach(function (key) {
      if (key.match(re)) {
        //do something
      }
    });
Comment

looping through local storage javascript

for (const [key, value] of Object.entries(localStorage)) {
	console.log(`${key}: ${value}`);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: react router how to send data 
Javascript :: convert set to array javascript 
Javascript :: pdf to json online 
Javascript :: remove beginning of base64 javascript 
Javascript :: backbone js cdn 
Javascript :: nevigate on button click in angular 
Javascript :: how to do get request in axios 
Javascript :: make object readonly javascript 
Javascript :: how to check if input is string javascript 
Javascript :: react make setstate synchronous 
Javascript :: React Native typescript start new project 
Javascript :: jquery if element appears 
Javascript :: capitalize first letter of each word 
Javascript :: join array of objects javascript 
Javascript :: Best way to execute js only on specific page 
Javascript :: inherit javascript 
Javascript :: jquery api 
Javascript :: operators in javascript 
Javascript :: angular convert map values to array 
Javascript :: get json data into object 
Javascript :: classic asp get json from url 
Javascript :: jquery close 
Javascript :: how to export module in node js 
Javascript :: ngif is string angular 
Javascript :: js change number to string 
Javascript :: jest add alias 
Javascript :: css variable value changing with javascript 
Javascript :: react router dom v6 
Javascript :: javascript loop replace object values using function 
Javascript :: trigger keyboard event javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =