रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
blockly > VariableMap > getVariable
VariableMap.getVariable() तरीका
दिए गए नाम और टाइप के हिसाब से वैरिएबल ढूंढें और उसे दिखाएं. अगर वैल्यू नहीं मिलती है, तो शून्य दिखाता है.
हस्ताक्षर:
getVariable(name: string, opt_type?: string): IVariableModel<IVariableState> | null;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
नाम |
स्ट्रिंग |
वह नाम जिसकी जांच करनी है. |
opt_type |
स्ट्रिंग |
(ज़रूरी नहीं) वैरिएबल का टाइप. अगर यह वैल्यू नहीं दी जाती है, तो डिफ़ॉल्ट रूप से खाली स्ट्रिंग दिखती है. यह एक खास टाइप की स्ट्रिंग होती है. |
लौटाए जाने वाले प्रॉडक्ट:
IVariableModel<IVariableState> | null
दिए गए नाम वाला वेरिएबल या अगर वेरिएबल नहीं मिला, तो शून्य.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-05-16 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-05-16 (UTC) को अपडेट किया गया."],[[["The `getVariable()` method searches for a variable within the VariableMap by its name and optionally by its type."],["If a matching variable is found, the method returns a `VariableModel` object representing that variable; otherwise, it returns `null`."],["The `name` parameter is mandatory and specifies the name of the variable to search for."],["The `opt_type` parameter is optional and specifies the type of the variable; if not provided, it defaults to the empty string, which represents a specific type in Blockly."]]],[]]