object is not iterable code example

Example 1: TypeError: 'int' object is not iterable

#If you have a variable that is a list
#and you attempt to perform an operation on it, it will error
a = [1]
#Instead, just remove the brackets
a = 1
a+=1

Example 2: int object is not iterable

int_variable = x
for element in range(int_variable):
  #Code of the for loop

Example 3: typeerror is not iterable javascript

var obj= {  a:10,  b:20,  c:30,}for (var v of obj){  console.log(v);}------------------for(var v of obj){             ^TypeError: obj is not iterable