Objects in JavaScript vs Structs in Solidity #6009
COSMICnoob80
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An object in JavaScript has properties, which are like the characteristics of the thing you're representing, and methods, which are like the actions you can perform on that thing.
In Solidity, a struct is a way to define a custom data structure to represent a complex entity, somewhat similar to JavaScript objects. It allows you to group variables together under a single name.
Both JavaScript objects and Solidity structs help you organize and manage data in a structured way.
Beta Was this translation helpful? Give feedback.
All reactions