This message was deleted.
# ask-questions
w
This message was deleted.
p
You'll need to wait till gb is initallized to check for the feature flag. Simplest thing to do would be to move the check for the feature right under
console.log("GrowthBook initialized");
r
@plain-scooter-8648 thank you. Only now, they're evaluating as "true" every time when the experiment running should be rendering them as true sometimes and false other times, what am I doing wrong?
p
I would first check the rules on your feature flag to make sure there's nothing that would be making your browser always get the feature flag on. (keep in mind that experiments are sticky to the assignment ID so once your are in an experiment you'll always receive the same value for the feature flag, You might need to login with a different test account or view your site from the private window)
r
Thank you @plain-scooter-8648 thats very helpful. One more question, I set up a new experiment with a new feature with numbers. The features default value is 15, but the 2 different groups in the experiment should return either the numbers 7 or 8. Currently, I can only find in the documentation gb.getFeatureValue() which returns the default value 15--rather than the value from the experiment. The experiment is running. Is there a specific method in the javascriptSDK that allows me to access the given value of a feature flag when put into an experiment?
it almost seems like as I test it, I'm never actually getting put into an experiment?
191 Views