using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
public static void Test()
public static void Test1()
Type = "studebaker convertible",
var value = new Jint.Engine()
.Execute("function car(obj) { const type = obj.Type; return type;}")
Console.WriteLine(value);
Assert.AreEqual(value.AsString(), car.Type);
public static void Test2()
Type = "studebaker convertible",
var value = new Jint.Engine()
.Execute("const result = (function car(obj) { const type = obj.Type; return type;})(obj)")
Console.WriteLine(value);
Assert.AreEqual(value.AsString(), car.Type);
public static void Test3()
Type = "studebaker convertible",
var value = new Jint.Engine()
.Execute("function car(obj) { const type = obj.Type; return type;}; car(obj);")
Console.WriteLine(value);
Assert.AreEqual(value.AsString(), car.Type);
public static void Main()
Console.WriteLine("Environment version: " + Environment.Version);
Console.WriteLine("{0} version: {1}", typeof(Jint.Engine).Namespace, typeof(Jint.Engine).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");