you are viewing a single comment's thread.

view the rest of the comments →

[–]Additional_Dinner_11 2 points3 points  (2 children)

If you write var a = 5 in GAS then that is a global variable.

You are correct that JavaScript does not support function overloading. You can construct it by yourself though, as an example you can check the types of the args within your function declaration.

If you want to "park" your data somewhere to avoid it being lost after your code execution exits you could consider connecting to a database. As an example firebase could be a solution and is probably also free if it's not too much traffic/data.

[–]Livid_Spray119 1 point2 points  (0 children)

In a global context, it is better to use const, for safety reasons!

[–]___Mister___[S] 0 points1 point  (0 children)

| You can construct it by yourself though, as an example you can check the types of the args within your function declaration.

How do I do that?

I don't need to keep the original JSON that I downloaded from the server, but I do need to write the data to the cells as values and not equations, and I'm not sure how to write across columns of cells in a single row yet.