Advertisement
firoze

Data type indentify in javascript and php

Feb 21st, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /* define data type in php*/
  2. <?php
  3. $name = 'Firoze';
  4. var_dump(gettype($name));
  5.  
  6. ?>
  7.  
  8. /* define data type in javascript*/
  9.  
  10. /*
  11. null is object
  12. true or false boolean
  13. 1,2....etc like this is number
  14. anything in '' or "" that are string
  15. like this 555555555555555*'abc' is NaN but a number
  16. */
  17.  
  18. var what_type = 555555555555555*'abc';
  19.  
  20. console.log(what_type);
  21. console.log(typeof what_type);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement