mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
@@ -157,7 +157,7 @@ Blockly.JavaScript['math_number_property'] = function(block) {
|
||||
'mathIsPrime',
|
||||
['function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + '(n) {',
|
||||
' // https://en.wikipedia.org/wiki/Primality_test#Naive_methods',
|
||||
' if (n === 2 || n === 3) {',
|
||||
' if (n == 2 || n == 3) {',
|
||||
' return true;',
|
||||
' }',
|
||||
' // False if n is NaN, negative, is 1, or not whole.',
|
||||
|
||||
Reference in New Issue
Block a user