1+ {
2+ "data" : {
3+ "question" : {
4+ "questionId" : " 2770" ,
5+ "questionFrontendId" : " 2754" ,
6+ "categoryTitle" : " JavaScript" ,
7+ "boundTopicId" : 2323990 ,
8+ "title" : " Bind Function to Context" ,
9+ "titleSlug" : " bind-function-to-context" ,
10+ "content" : null ,
11+ "translatedTitle" : " 将函数绑定到上下文" ,
12+ "translatedContent" : null ,
13+ "isPaidOnly" : true ,
14+ "difficulty" : " Medium" ,
15+ "likes" : 0 ,
16+ "dislikes" : 0 ,
17+ "isLiked" : null ,
18+ "similarQuestions" : " []" ,
19+ "contributors" : [],
20+ "langToValidPlayground" : null ,
21+ "topicTags" : [],
22+ "companyTagStats" : null ,
23+ "codeSnippets" : null ,
24+ "stats" : " {\" totalAccepted\" : \" 18\" , \" totalSubmission\" : \" 20\" , \" totalAcceptedRaw\" : 18, \" totalSubmissionRaw\" : 20, \" acRate\" : \" 90.0%\" }" ,
25+ "hints" : [
26+ " The easiest way to solve this is to use the built-in fn.apply() method." ,
27+ " Without built-in methods, you need to figure out a way to call the function (this) from context object. That will associate \" this\" appropriately." ,
28+ " You can create a new Symbol(). Attach the symbol to the context object and set the method to be \" this\" . Then call the method on the symbol."
29+ ],
30+ "solution" : null ,
31+ "status" : null ,
32+ "sampleTestCase" : " function f(multiplier) { return this.x * multiplier; }\n {\" x\" :10}\n [5]" ,
33+ "metaData" : " {\n \" name\" : \" jsonParse\" ,\n \" params\" : [\n {\n \" name\" : \" fn\" ,\n \" type\" : \" string\"\n },\n {\n \" type\" : \" string\" ,\n \" name\" : \" obj\"\n },\n {\n \" type\" : \" string\" ,\n \" name\" : \" inputs\"\n }\n ],\n \" return\" : {\n \" type\" : \" integer\"\n },\n \" languages\" : [\n \" javascript\" ,\n \" typescript\"\n ],\n \" manual\" : true\n }" ,
34+ "judgerAvailable" : true ,
35+ "judgeType" : " large" ,
36+ "mysqlSchemas" : [],
37+ "enableRunCode" : true ,
38+ "envInfo": "{\"javascript\":[\"JavaScript\",\"<p>\\u7248\\u672c\\uff1a<code>Node.js 16.13.2<\\/code><\\/p>\\r\\n\\r\\n<p>\\u60a8\\u7684\\u4ee3\\u7801\\u5728\\u6267\\u884c\\u65f6\\u5c06\\u5e26\\u4e0a <code>--harmony<\\/code> \\u6807\\u8bb0\\u6765\\u5f00\\u542f <a href=\\\"http:\\/\\/node.green\\/\\\" target=\\\"_blank\\\">\\u65b0\\u7248ES6\\u7279\\u6027<\\/a>\\u3002<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u5982\\u9700\\u4f7f\\u7528\\u961f\\u5217\\/\\u4f18\\u5148\\u961f\\u5217\\uff0c\\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/priority-queue\\/tree\\/fb4fdb984834421279aeb081df7af624d17c2a03\\\" target=\\\"_blank\\\"> datastructures-js\\/priority-queue@5.3.0<\\/a> \\u548c <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/queue\\/tree\\/e63563025a5a805aa16928cb53bcd517bfea9230\\\" target=\\\"_blank\\\"> datastructures-js\\/queue@4.2.1<\\/a>\\u3002<\\/p>\"],\"typescript\":[\"TypeScript\",\"<p>TypeScript 4.5.4<\\/p>\\r\\n\\r\\n<p>Compile Options: --alwaysStrict --strictBindCallApply --strictFunctionTypes --target ES2020<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u5982\\u9700\\u4f7f\\u7528\\u961f\\u5217\\/\\u4f18\\u5148\\u961f\\u5217\\uff0c\\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/priority-queue\\/tree\\/fb4fdb984834421279aeb081df7af624d17c2a03\\\" target=\\\"_blank\\\"> datastructures-js\\/priority-queue@5.3.0<\\/a> \\u548c <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/queue\\/tree\\/e63563025a5a805aa16928cb53bcd517bfea9230\\\" target=\\\"_blank\\\"> datastructures-js\\/queue@4.2.1<\\/a>\\u3002<\\/p>\"]}",
39+ "book" : null ,
40+ "isSubscribed" : false ,
41+ "isDailyQuestion" : false ,
42+ "dailyRecordStatus" : null ,
43+ "editorType" : " CKEDITOR" ,
44+ "ugcQuestionId" : null ,
45+ "style" : " LEETCODE" ,
46+ "exampleTestcases" : " function f(multiplier) { return this.x * multiplier; }\n {\" x\" :10}\n [5]\n function speak() { return \" My name is \" + this.name; }\n {\" name\" :\" Kathy\" }\n []" ,
47+ "__typename" : " QuestionNode"
48+ }
49+ }
50+ }
0 commit comments