I am confused with the way I write my javascriptand I am wondering what are the differences between? They all generate the same result but which is the best way to write it?
I am using Framer.js
library for prototyping. I do aware Framer.js
uses coffeescriptbut I am writing them in vanilla javascript.
Difference 1
framerOnboard.card1.states.animationOptions({
curve: "spring(200, 20, 0)"
});
framerOnboard.card1.states.animationOptions = {
curve: "spring(200, 20, 0)"
};
Difference 2
framerOnboard.card1.states["switch"]("two");
framerOnboard.card1.states.switch("two");