Skip to content
Advertisement

What is the name and what is the omission operator for;

For example, in the code below I use ; instead of leaving, var or const. What is the name of this operator? Does it serve to clone other variables? Answer Normal for loops have 3 components inside the brackets, all of which are optional and you can have any combination of them: The semicolon ; is not an omission operator

forEach array getting error TypeError: Cannot read property ‘forEach’ of undefined

im trying to clean some sheets, individually i make it work uncommenting and changing sheet name but when when i try to group in array and execute with foreach im getting error TypeError: Cannot read property ‘forEach’ of undefined doCleanSheets @ – 10x_to_11x.gs:87 line 87 is SpreadsheetApp.getActive().sheet.forEach(doClean); searched for error, but results were way more complex than my case, and

Split paths and hashes into 2 different variables

I have one variable. The variable looks like this: etc, etc. How do I get 2 different variables, one containing the paths and the other containing the hashes? For example, the paths will be like this: I’m new to javascript btw, sorry. Answer If I understand you correctly, you want to split all the content into two multi line string,

Why random number doesn’t change in every iteration?

I want to set a matrix with random numbers. I used a function to create a 0 matrix first, then loop through every cell and assign a random number to it. When I run the code, I get the following output. As can be seen in the picture, the random value changes only when i changes. Is this related to

Advertisement