diff --git a/README.md b/README.md index 8cea4965b1..2b003dd43a 100644 --- a/README.md +++ b/README.md @@ -200,11 +200,9 @@ Assert.AreEqual("Minnie", p.Name); You can invoke JavaScript function reference ```c# -var add = new Engine() +var result = new Engine() .Execute("function add(a, b) { return a + b; }") - .GetValue("add"); - -add.Invoke(1, 2); // -> 3 + .Invoke("add",1, 2); // -> 3 ``` or directly by name ```c#