Initialize encryption and JavaScript reverse-engineering study repository
Document the project structure and setup while excluding local dependencies and IDE settings. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
24
非对称加密-2026-09-02/_invoke方法执行过程.js
Normal file
24
非对称加密-2026-09-02/_invoke方法执行过程.js
Normal file
@@ -0,0 +1,24 @@
|
||||
class MyFunc {
|
||||
_invoke(func_name, a, b) {
|
||||
switch (func_name) {
|
||||
case 'add':
|
||||
return this._add(a, b);
|
||||
case 'subtract':
|
||||
return this._subtract(a, b);
|
||||
default:
|
||||
throw new Error(`Invalid func name, ${operation}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_add(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
_subtract(a, b) {
|
||||
return a - b;
|
||||
}
|
||||
}
|
||||
|
||||
const myFunc = new MyFunc();
|
||||
console.log(myFunc._invoke("add", 10, 5))
|
||||
Reference in New Issue
Block a user