//导入头文件
#import <JSPatchPlatform/JSPatch.h>
#pragma mark ------ 1.JSValue 声明代理及属性 -------
! 代理一定要继承与 JSExport
@protocol ViewControllerDelegate <JSExport>
@property (nonatomic, strong) NSString *name;
@end
#pragma mark ------ 2.JSValue 遵循代理 -------
@interface ViewController ()<ViewControllerDelegate>
@end```
pragma mark ------ 3.JSValue 、添加setter和getter方法 ------
@synthesize name;
pragma mark ------ 4. JSValue (改变属性的值)-------
JSContext *context = [[JSContext alloc] init];
self.name = @"大白好";
context[@"s"] = self;
[context evaluateScript:@"s.name = '真帅'"];
NSLog(@"%@", self.name);