• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright JS Foundation and other contributors, http://js.foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15print("break test");
16
17print ("var cat");
18var cat = 'cat';
19
20function test(x)
21{
22  function f() {
23    return 0;
24  }
25
26  function f() {
27    /* Again. */
28    return 1;
29  }
30
31  function f() {
32    /* And again. */
33    return 2;
34  }
35
36  print("function test");
37  var a = 3;
38  var b = 5, c = a + b;
39  global_var = f();
40  return c;
41}
42
43function f() {
44  /* And again. */
45}
46
47var
48  x =
49    1;
50
51test(x);
52