how to get value and key in a for of loop in js
const test = {a: 1, b: 2, c: 3};
for (const [key, value] of Object.entries(test)) {
console.log(key, value);
}
Also in JavaScript:
- API requests return index.html in production
- execute terminal command nodejs
- js implement hot reload
- javascript reserved words
- DECIMAL TO BINARY CONVERSION javascript
- random array javascript
- javascript navigator.mediaDevices.getUserMedia
- react cloud foundry nginx 404
- nodejs how to use dynamic variable after dot
- js object contain key
- regular expression not to allow space in javascript
- javascript check if key exists in object
- Create a 'uniqueWords' function that accepts a string 'str' and returns an array of all the unique words in that string.
- set class name javascript
- mdn for..of
- textinput onpress react native
- access session data from ejs view
- how to log something in the console. javascript
- javascript includes method
- fs.writefile
- compare two arrays
- how to get json file in javascript
- js ask before close chrome
- javascript add minutes to date