0

I'm debugging some JavaScript in Visual Studio 2013 and when inspecting some variables I'm seeing [native code] for some variables. For instance:

Variable r =>
function slice() {
    [native code]
}
    Object, (Function)

Does that mean that it's not JavaScript code, like C# or something? The app I'm debugging is an ASP.NET website.

Eric
  • 2,861
  • 6
  • 28
  • 59
  • 1
    Yes. It means it's a [*built–in*](http://ecma-international.org/ecma-262/5.1/#sec-4.3.7) function. – RobG Jan 28 '15 at 20:09
  • Oh, so it's just the built-in slice function? Seems kind of strange that they assigned that to a variable, but oh well. – Eric Jan 28 '15 at 20:11
  • possible duplicate of [What does " \[native code\] " mean?](http://stackoverflow.com/questions/11234664/what-does-native-code-mean) – Dan Korn Jan 28 '15 at 20:12
  • @Eric—yes. You should get the same result for all built–in objects (noting that functions are objects). – RobG Jan 28 '15 at 20:12
  • the built in slice function is not assigned to a variable, that would be strange. also note that any bound functions will give the same "source code", even if they are normally user-land functions. – dandavis Jan 28 '15 at 20:25
  • Here's a simplified example of what's going on in the minified JavaScript I'm trying to debug: ``So basically they're using the local slice variable as a way to store the function arguments to a local array. – Eric Jan 28 '15 at 20:39

0 Answers0