2

What's the proper way to declare an object in pseudocode. For example:

const car = {type:"Fiat", model:"500", color:"white"};

Would it be correct to write

object car { type: "Fiat" model: "500" color: "white" }

Or should a different format be used?

Thanks in advance.

waldo
  • 21
  • 2

1 Answers1

3

There is no one "proper" way. Pseudocode is not a formally defined language that has an accepted syntax. Rather, it is an informal form of communication.

The criterion is: will it be clear to the reader? That will require you to use some judgement and knowledge of your audience.

If you are not sure, I suggest you use a different syntax that you are confident readers will understand, and/or include an explanation of your syntax in the text that accompanies the pseudocode.

D.W.
  • 167,959
  • 22
  • 232
  • 500