You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a function error in the tutorial : http://learn.ractivejs.org/expressions/1 , which the 'format' function for the third 'case num>1000' is wrong, suppose the 'population = 2000', it will output '2,0'.
Code:
error: 'if ( num > 1000 ) return ( Math.floor( num / 1000 ) ) + ',' + ( num % 1000 );'
It should work in this way: 'if ( num >= 1000 ) return ( Math.floor( num / 1000 ) ) + ',' + ( String.prototype.slice.call(num,-3) );'
The text was updated successfully, but these errors were encountered:
There is a function error in the tutorial : http://learn.ractivejs.org/expressions/1 , which the 'format' function for the third 'case num>1000' is wrong, suppose the 'population = 2000', it will output '2,0'.
Code:
error: 'if ( num > 1000 ) return ( Math.floor( num / 1000 ) ) + ',' + ( num % 1000 );'
It should work in this way: 'if ( num >= 1000 ) return ( Math.floor( num / 1000 ) ) + ',' + ( String.prototype.slice.call(num,-3) );'
The text was updated successfully, but these errors were encountered: