Math/Javascript question
Ok,
so I have 3 variables -
1. views by users
2. days on website
3. +cool votes
I am trying to establish the correct averaging formula for finding out which topic/post is the coolest.
I *think* it would be the following
topic_name = 'cards article';
days = 43;
views = 13;
cool = 10;
popularity = views/days;
cool_vs_popularity = cool/popularity;
topic.push(topic_name);
rating.push(cool_vs_popularity);
It seems to work on my end, but I am double-checking to see if anyone sees it differently. "topic.push", and "rating.push" refer to arrays that would exist to house topics and ratings. Also if there is a way to pass the topic name variable along with the rating, but preferably without using a string delimiter.
Last edited by Falkon303; 03-27-2011 at 06:58 AM.
document.write is document.wrong
Bookmarks