Jump to content
Search Community

How much English does JavaScript or gsap understand?

Elindo test
Moderator Tag

Recommended Posts

So my friend @nicofonseca created a variable called  isbuttonADisabled  and gave a value of false..  then called out the variable on another set of buttons to give it a true or false value..

 

how does JavaScript or gsap recognizes that I am looking to disable the button by simply pulling a word out of the air and giving a true or false value?

 

what if the word was enable and you have the same true or false values? How does JavaScript recognizes between a bunch of words and know what I want?     

Link to comment
Share on other sites

It doesn't "understand" any English whatsoever. You can name variables/properties whatever you want (within the guidelines of JavaScript, like you typically can't start the name with special characters or numbers, etc.) Nico could have just as easily named that variable "pinkToadsAreCool". It's merely a holder for a value, that's it. GSAP/JavaScript doesn't try to decipher the meaning in any of the variables or property names. 

 

You might benefit from taking a course or reading some articles on basic JavaScript. I don't mean that at all as an insult or dig - I just genuinely think it might help clear some things up for you. Once you wrap your head around some of that stuff...and the GSAP API, you'll be an animation superhero in no time. :)

 

For future reference, we really try to keep these forums focused on GSAP-specific questions. Please read the Forum Guidelines

 

Happy tweening! 👍

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...