Search found 3 matches

by dvanw
June 28th, 2021, 3:24 pm
Forum: Expression Discussion
Topic: prime numbers ccounter
Replies: 4
Views: 12170

Re: prime numbers ccounter

I made some progress in my knowledge of the expressions and javascript syntax.... But I'm still stucked... P = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149] ; t = (time*25).toFixed(0); if (P.includes(t)){ text.sourceText.createStyle().setFontSize(7...
by dvanw
June 28th, 2021, 10:48 am
Forum: Expression Discussion
Topic: prime numbers ccounter
Replies: 4
Views: 12170

Re: prime numbers ccounter

I'm trying to make a counter whose color will change when the number dispalyed is prime. The best way I've found to do that is to check if the number is part of an array where I'll have all the primes from 2 to1000, for instance. I'm not sure I understand the distinction you're doing between express...
by dvanw
June 22nd, 2021, 4:26 am
Forum: Expression Discussion
Topic: prime numbers ccounter
Replies: 4
Views: 12170

prime numbers ccounter

Hello ! I've been tryiong to make a simple integer counter with the prime numbers being displayed in a specific color. I'm not a coder, and I had already some trouble discovering the syntax I need to do it. But' I'm afraid I've run into a more srieus trouble, because I can't find a way to incrmement...