Vader Sentiment Analysis icon Vader Sentiment Analysis — VADER sentiment analyzer for ARC returns positive, neutral, negative percents and a compound score from text; enables emotion-driven behaviors. Try it →
Asked
Setvar Global Variable Quotes?

Setvar Global Variable Quotes?

In ARC JavaScript, what is the proper way to set the value of a global variable - with or without quotes? Both seem to work.

I'm using ARC's JavaScript scripting (setVar) in an ARC project to set a global variable. Example code:

setVar("$anamationStatus", 0)

setVar("$anamationStatus", "0")

If there is a difference, and it matters, why?



Related Hardware (view all EZB hardware)
EZ-B V4 by EZ-Robot
EZ-B v4 with Synthiam ARCx controls servos, sensors, camera and audio over Wi-Fi or USB serial, no firmware needed.
Wi-Fi / USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 24

ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.