Skip to content

Instantly share code, notes, and snippets.

@pingw33n
Created July 18, 2011 12:08
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pingw33n/1089320 to your computer and use it in GitHub Desktop.
Save pingw33n/1089320 to your computer and use it in GitHub Desktop.
JavaScript Value JavaScript Type Java Type Is Scriptable Is Function
{a:1, b:['x','y']} object org.mozilla.javascript.NativeObject + -
[1,2,3] object org.mozilla.javascript.NativeArray + -
1 number java.lang.Double - -
1.2345 number java.lang.Double - -
NaN number java.lang.Double - -
Infinity number java.lang.Double - -
-Infinity number java.lang.Double - -
true boolean java.lang.Boolean - -
"test" string java.lang.String - -
null object null - -
undefined undefined org.mozilla.javascript.Undefined - -
function () { } function org.mozilla.javascript.gen.c1 + +
/.*/ object org.mozilla.javascript.regexp.NativeRegExp + +
@andrew-medvedev
Copy link

thx

@vamshichanda-git
Copy link

Hi, i have doubt. I'm completely new to this.
Why is 1 converted to a Double and not an Integer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment