Discord
Login
Community
DARK THEME

What is "type"?

So I was just testing stuff in my project and I saw "type" with a blue text color in the code editor when I tried making a typing effect.What is "type"?

This is something I plan to add to microScript, checking the type of a variable or expression:

if exp.type == "string" then
  print("expression is a string")
elsif exp.type == "number" then
  print("expression is a number")
elsif exp.type == "list" then
  print("expression is a list")
elsif exp.type == "object" then
  print("expression is an object")
elsif exp.type == "function" then
  print("expression is a function")
elsif exp.type == "undefined" then
  print("expression is not defined")
end

In the code above, exp could be a variable or any expression.

Noted.

And also "class",what is it?

They are nicely explained in the Documentation section, have a look and let us know if you have more questions regarding them =)

microStudio Documentation


Live Long And Tinker

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community