Type detection: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{draft task|FIXME}} |
|||
This draft task needs a purpose, a description and some way to tell whether examples satisfy or do not satisfy it. |
|||
== JavaScript == |
== JavaScript == |
||
Revision as of 13:29, 8 October 2015
Type detection is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
This draft task needs a purpose, a description and some way to tell whether examples satisfy or do not satisfy it.
JavaScript
console.log(typeof('foo')); // Returns string console.log(typeof(12345)); // Returns number
PHP
echo gettype('foo'); // Returns string echo gettype(12345); // Returns integer