GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Unexpected behavior with ternary operator syntax a ? : 1 in evaluate() · Issue #3578 · josdejong/mathjs Closed Labels DescriptionDescription:When using the evaluate() function in math.js, the expression 'a ? : 1' returns 1 even when a is truthy. This seems to contradict the expected behavior of the ternary operator, which should follow the format condition ? trueExpr : falseExpr.
Steps to Reproduce:
Expected Behavior:This expression should either:
Actual Behavior:Returns 1, which is the falseExpr, even though a is 5 (truthy). Environment:math.js version: 14.5.2 Additional Context:This behavior may indicate a parsing issue or an undocumented fallback mechanism in the ternary operator implementation. It would be helpful to clarify whether this is intended behavior or a bug. Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |