Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clean code javascript

//Not clean code 
const array = ["Fahad", "Khan", "Babar"];
for(let i=0; i < array.length; i++){
	console.log(array[i]);
}

//Clean code 
const array = ["Fahad", "Khan", "Babar"];
array.forEach((item,index) => console.log(index, item))
 
PREVIOUS NEXT
Tagged: #clean #code #javascript
ADD COMMENT
Topic
Name
7+6 =