Why string to number conversion is confusing | chai aur #javascript
Summary
TLDRThe video script discusses various concepts related to operations and type conversion in JavaScript. It emphasizes the importance of understanding how different data types interact and convert during operations, such as the behavior of strings and numbers when added together. The script also touches on the significance of individual contributions to a series, urging viewers to subscribe and share on LinkedIn for motivation. It delves into examples like increment operators and the challenges they present, advocating for clean and readable code to ensure maintainability and understanding by others.
Takeaways
- 😀 The video script is in Hindi and discusses the importance of subscribing and sharing the series for motivation.
- 📚 It covers the basics of operations and conversions in programming, emphasizing the simplicity of operations like 2 + 2.
- 🔍 The script touches on the concept of value assignments and how to handle negative values in programming.
- 📝 It explains the use of comments in code with control slash to ensure only operations are focused on after them.
- 👀 The video aims to discuss important operations and their reasoning behind them, rather than every single detail.
- 🔢 The script mentions the intricacies of number and string conversions, and how they behave differently based on their order in expressions.
- 💬 It highlights the importance of understanding the reasoning behind operations and their solutions for better comprehension.
- 🔄 The discussion includes special type conversions and tricky conversions, suggesting further research for those interested.
- 🛠️ The script advises against writing confusing code and emphasizes the importance of readability and simplicity in programming.
- 🔄 It explains how different values are treated during operations, especially when it comes to increment and decrement operators.
- 🔗 The video ends with a reminder to share the video and subscribe, promising clearer concepts as the project progresses.
Q & A
What is the primary motivation mentioned in the script for viewers to share the series on LinkedIn?
-The script suggests that the primary motivation for viewers to share the series on LinkedIn is to provide the creators with motivation, as they are deeply involved in the series and want to ensure that people who are watching are also appreciating and sharing it.
What is the basic concept of 'Operations' discussed in the script?
-The script explains 'Operations' as a simple concept, exemplified by the operation of adding two strings together or performing arithmetic operations like 2 + 2.
What does the script imply about the necessity of individual contributions in the series?
-The script emphasizes the importance of individual contributions, suggesting that they are crucial and asking viewers to share the series on LinkedIn to show their support.
What is the script's stance on the depth of the content covered in the series?
-The script indicates that the series goes into great depth, implying that a single share on LinkedIn can make a difference in acknowledging the effort put into the content.
How does the script address the concept of 'value' in the context of operations?
-The script discusses 'value' in terms of assigning values within operations, such as assigning a negative value and what it means in the context of the operation being performed.
What is the script's advice on writing code for practical applications?
-The script advises against writing confusing code and emphasizes the importance of writing clean, simple, and readable code, especially in a professional or corporate setting.
What is the script's perspective on the importance of understanding the underlying reasons behind operations?
-The script suggests that while understanding the underlying reasons ('the region') and solutions behind operations is important, it may not be necessary for everyone, especially if they are not building their own engine or implementing browser features.
How does the script handle the concept of 'Conversion' in the context of operations?
-The script touches on 'Conversion' by explaining how different types of values are treated during operations, such as treating all values as strings or numbers depending on their position in the operation.
What is the script's view on the importance of sharing individual contributions on social platforms like LinkedIn?
-The script views sharing individual contributions on platforms like LinkedIn as very important, as it provides motivation to the creators who are deeply involved in the series.
How does the script discuss the concept of 'increment' in operations?
-The script discusses 'increment' in operations by providing examples of how values are increased, such as using the increment operator with variables like 'game counter'.
What is the script's advice regarding the use of parentheses in operations?
-The script advises on the importance of understanding operator precedence and using parentheses to ensure that operations are performed in the intended order.
Outlines
📝 Introduction to Operations and Conversions
The speaker begins by addressing the audience and encouraging them to subscribe and share the series if they haven't already, emphasizing the importance of individual contributions. The main topic of discussion is operations, starting with the basics such as string concatenation and number operations, and moving on to more complex topics like value assignments and negative values. The speaker clarifies that there's no need for the audience to understand every detail deeply but assures that important concepts will be discussed in depth, including their reasons and solutions. The summary also touches on the importance of sharing the content on LinkedIn for motivation.
🔢 Exploring JavaScript Type Conversions and Operator Behavior
This paragraph delves into the intricacies of JavaScript type conversions and operator behavior, particularly focusing on how different types are treated when used in operations. The speaker explains that while some conversions happen automatically, understanding the rules and guidelines is crucial, especially when writing code that might be reviewed or used by others. The summary covers the concept of primitive type conversions, the importance of writing clean and understandable code, and the potential confusion that can arise from improper use of operators and type conversions. It also mentions the importance of adhering to guidelines when performing conversions to avoid confusion and ensure code quality.
👨🏫 Advanced JavaScript Concepts and Code Readability
The final paragraph discusses advanced JavaScript concepts such as operator precedence and the use of assignment operators. The speaker warns against writing confusing code and emphasizes the importance of readability and consistency. The summary highlights the potential pitfalls of using certain coding tricks and behaviors that may not be understood by others in a team setting. It also touches on the importance of understanding increment and decrement operators, and the need to study documentation for a deeper understanding of these concepts. The speaker encourages the audience to share the video and subscribe for more content.
Mindmap
Keywords
💡Contribution
💡Operation
💡Primitive
💡Type Conversion
💡Increment
💡Syntax
💡Parenthesis
💡Boolean
💡String
💡Variable
Highlights
Introduction to the importance of subscribing and sharing the series for motivation.
Explanation of basic conversions like numbers to booleans and strings.
Discussion on operations, starting with a simple example of 2 + 2.
Clarification that understanding the depth of operations is not necessary for everyone.
The concept of assigning negative values and the impact on output.
Use of control slash for commenting out code.
Demonstration of how values are assigned and the output expected.
The automatic conversion of values and its implications in programming.
Misunderstandings that can arise from the automatic conversion of values.
The behavior of JavaScript when concatenating strings and numbers.
Guidelines on when to use parentheses for clarity in code.
The difference between prefix and postfix operators in JavaScript.
Common mistakes made with increment operators and how to avoid them.
The importance of code readability and maintainability in professional settings.
How to handle special cases of type conversion in JavaScript.
The significance of operator precedence and how it affects code execution.
Tips on writing clean and understandable code, avoiding confusing patterns.
Conclusion emphasizing the importance of sharing the video and subscribing for more.
Transcripts
हान जी स्वागत है आप सभी का चाय और कोर्ट
में सबसे पहले उम्मीद करता हूं अगर आप इस
सीरीज को देख रहे हैं अभी तक सब्सक्राइब
भी नहीं किया एक बार भी लिंक्डइन पर शेयर
नहीं किया है तो हमें मोटिवेशन कहां से
आएगा की लोग बजे सीरीज को देख रहे हैं
अप्रिशिएट कर रहे हैं देखिए एक-एक
इंडिविजुअल कंट्रीब्यूशन जो है ना बहुत
जरूरी होता है तो प्लीज फटाफट शेयर करिए
लिंकन पे क्योंकि हम इतना डेप्थ में जा
रहे हैं तो एक शेयर तो बनता है तो अभी हम
इस वीडियो के अंदर बात करेंगे ऑपरेशंस के
बारे में तो अभी देखिए कन्वर्जन तो हमने
देख लिया की नंबर से बुलियन बोलियां से
नंबर्स नंबर से स्ट्रिंग जहां पे भी हम कर
सकते हैं बेसिक इतना ही कन्वर्जन आपको
जानने की जरूरत है ऐसा नहीं है की आपको
इसके अंदर एचडी करनी है नहीं अभी नहीं
करनी है अभी हम देखेंगे ऑपरेशंस तो ये
ऑपरेशंस क्या चीज है बहुत ही आसान है 2 +
2 और हो गया एक ऑपरेशन है
ऑपरेशन है दो स्ट्रिंग थी जोड़ दिया एक
ऑपरेशन है तो इसी तरह का ऑपरेशन है अब कुछ
ऑपरेशंस में स्किप करूंगा सिर्फ उनको टच
करूंगा लेकिन जो इंपॉर्टेंट वैन है उसे पर
हम बात करेंगे डिस्कस करेंगे और जितने भी
नेम्स है वह सब आपको समझ में आने लगेंगे
की एक्चुअली में उनके पीछे रीजन क्या है
उनका सॉल्यूशन क्या है किस तरह से कम होता
है तो सबसे पहले हम ऑपरेशंस के बारे में
बात करते हैं जैसे की आपके पास एक वैल्यू
है तो आपने वैल्यू ली यहां पे थ्री और
आपने जब उसका कंसों लॉक किया तो आपने कहा
की वैल्यू की जगह मैं उसकी क्या करता हूं
या फिर कौन से लोग से पहले ही लेट नग
वैल्यू नेगेटिव वैल्यू तो आपने क्या कर
उसको असाइन कर दिया की मुझे नेगेटिव ऑफ
वैल्यू दो तो obbvious सी बात है इसमें
कोई डिफिकल्ट चीज नहीं है ये सब आप लोग
गैस कर सकते हैं की नेक वैल्यू के अंदर
क्या वैल्यू असाइन होगी या फिर क्या उसके
अंदर आउटपुट आएगा तो हम क्या करते हैं इन
दोनों लाइन को सिलेक्ट करते हैं कंट्रोल
स्लैश कर देते हैं ताकि कमेंट हो जाए बाकी
सब और कुछ प्रिंट नहीं हो रहा है तो हमारा
जो ध्यान है वो ऑपरेशंस के बाद ही रहे तो
ठीक है इसको हम रन करके देखते हैं हमने
कहा की नोड हमारे 01 फोल्डर के अंदर से
वही 035 है 03 तो क्या वैल्यू आई अब ठीक
है इसमें कुछ भी परिसर नहीं था की यहां पे
हमारे पास -3 ए गया क्यों ए गया नेगेटिव
वैल्यू अपने
[संगीत]
अगर आपने 11 12 किया है तो इनके बारे में
डिस्कशन ज्यादा इंपॉर्टेंट नहीं है
हालांकि रिमाइंडर जो है यहां पर जो मॉडल्स
है रिमाइंडर है इसका काफी उसे है
क्रिप्टोग्राफी में बहुत सारी algoridams
में तो वो और ज्यादा डिटेल में जब हम चैनल
पे जाएंगे तो उसके बारे में हम देख लेंगे
अच्छा यहां पे कुछ है ना ट्रिकी चीज भी
होती है उनके बारे में हम डिस्कस करते हैं
जैसे की फॉर एग्जांपल आपने कहा की जो स्तर
वैन है उसके अंदर आपने लिखा सिंपली हेलो
या फिर हितेश हेलो ही लिख लेते हैं तो ये
आपने लिखा हेलो और स्तर 2 के अंदर आपने
लिखा हितेश और हितेश लिखने से पहले या तो
यहां पे एक स्पेस दे दीजिए ताकि जो आप
जोड़े तो स्ट्रिंग एक साथ नहा जाए उसके
बीच में स्पेस आए तो इन दोनों का जो आपको
जोड़ना है तो कुछ परिसर नहीं है तो आप
क्या कर सकते हैं स्तर 3 ले सकते हैं और
उसके अंदर बोल सकते हैं की जो स्तर वैन है
उसको ऐड कर दो str2 से सब्सट्रैक्ट नहीं
होता है सिर्फ
कौन सा लॉक करेंगे तो सिंपल सी चीज है
इसमें कोई परिसर बात नहीं है की जब आप
स्तर 3 की वैल्यू देखेंगे सके तो बहुत
आसान है उसे वैल्यू के अंदर क्या आएगा आप
सभी लोग गैस कर सकते हैं इतना कोई
डिफिकल्ट था ही नहीं हेलो हितेश तो ठीक है
ये तो हो गया हमारा बेसिक की इस तरह से
स्ट्रिंग्स भी जोड़ी जा सकती है लेकिन पता
है प्रॉब्लम कहां आती है कुछ यहां पर
प्रॉब्लम आती है जैसे आपने consonal लॉक
किया अब उसके अंदर आपने कहा की ये मेरी
वैल्यू है वैन इसके साथ ऐड कर दीजिए 2 तब
एक प्रॉब्लम आया या फिर आपने इसी का उल्टा
कर दिया की यहां पे लिया वैन और जो तू है
वो वहां पे आपने दे दिया स्ट्रिंग अब
वैल्यू क्या आएगी ये होती है परिसर
सिचुएशन इसके बारे में हम करेंगे
प्रॉपर्ली डेस्क तो आप जब इसको आउटपुट
देते हैं तो आपने देखा यहां पे भी 12 है
यहां पे भी 12 है अच्छा ये कैसे हुआ इतनी
स्मार्ट कैसे हो गई की उसने ऑटोमेटिक कर
दिया और मुझे उसका सबमिशन भी दे दिया
अच्छा ये तो हो गया जब तक तो ठीक था लेकिन
क्या हो की अगर मैं इस वैन को बना डन एक
स्ट्रिंग
और दोनों स्ट्रिंग होगी
जैसे यहां पे आया लेकिन यहां पे तो आना
चाहिए था थ्री यहां पे भी इस तरह से ठीक
है तो अब एक चीज इंपॉर्टेंट देखिए अब क्या
होता है की अगर मैं इसको लिखता हूं 1 + 2
इसका आउटपुट ऑलरेडी देख चुके हैं 12 आता
है दोनों इसको साइड बाय साइड कर देते हैं
कोई कन्वर्जन नहीं होता है लेकिन क्या हुआ
अगर मैं ये करूं तो अब इंटरेस्टिंग आता है
तो अब इसका हम बिहेवियर देखते हैं तो इसने
कहा 12 और 2 ठीक है तो इसका वैल्यू ए गया
हमारे पास 122 हमने तो सोचा था की शायद
इसको पहले ऐड कर दिया जाएगा फोर और 14
वैल्यू आएगा बट नहीं यहां पे तो सारा
कन्वर्जन ही स्ट्रिंग के अंदर हो गया है
ठीक है ये भी हो एक चीज है लेकिन
जब इसका उल्टा करते हैं तब कुछ डिफिकल्ट
और कुछ डिफरेंट आपको मिलता है जैसे की
हान यहां पर मेरे को पता है अभी थोड़ा सा
कन्फ्यूजन ए रहा है की क्या होगा अब इसका
अगर कोई आपसे आउटपुट पूछ लेगा लास्ट लाइन
का तो आप obbvious सी बात है कंफ्यूज हो
जाएंगे की इसका आउटपुट ये कैसे आया की
यहां पे तो यह 3 और 2 ऐड हो गए और थ्री ए
गया और इसके साथ साइड बाय साइड हमने उसको
अटैच करके लिख दिया तो थ्री और तू 32 इंच
जैसा दिख रहा है हमें और यहां पे जो ये
वैन आया यहां पे कुछ भी कन्वर्जन नहीं हुआ
तो ये सब एक्चुअली में होता कैसे है अब
इसको चाहे आप रूल माने चाहे आप उसको
गाइडलाइन माने ये सब जो ड्राइव होता है वो
इस लिंक से होता है तो यहां पे आप
ekmascript की जब गाइडलाइंस पर जाएंगे तो
जब भी आपको तू प्रिमिटिव यानी की कन्वर्ट
करना है किसी को भी प्रेफर टाइप में तो ये
कुछ गाइडलाइन से जो फॉलो करती है तो यहां
पे लिखा हुआ है एब्स्ट्रेक्ट ऑपरेशन तू
प्रिमिटिव टैक्स इनपुट और उसके बाद प्रेफर
टाइप स्ट्रिंग या नंबर हम डिसाइड करते हैं
की किस्म कन्वर्जन होना चाहिए या फिर कौन
सी वैल्यू पहले ए रही है अब इसके अंदर में
ज्यादा डिटेल में नहीं जाऊंगा क्योंकि अभी
आपको जाने की भी जरूरत नहीं है ये थोड़ा
सा और रिसर्च टॉपिक है स्पेशली जब आप
कुछ खुद का इंजन बना रहे हैं यह आपको एक
ब्राउज़र इंप्लीमेंटेशन करना है तब आपको
यहां पे आता है और एक पुराना वीडियो भी
मैंने इसके अंदर दिया था जहां पे मैंने
पूरा आधा घंटा इसके अंदर डिस्कस किया था
की किस तरह से यह इनपुट वैल्यूज है वह
वीडियो भी मैं डिस्क्रिप्शन में लिंक में
दे दूंगा या फिर इस फाइल के अंदर यह ऐड कर
दूंगा तो यहां पे आप देख सकते हैं जब आपका
इनपुट ऑब्जेक्ट हो और आपको किस में
कन्वर्ट करना हो तब क्या होता है डिफाल्टर
स्ट्रिंग यहां तक की उनकी एल्गोरिथम भी
लिख राखी है की आपको तू बोलियां में
कन्वर्ट करना और तू नंबर में तो क्या-क्या
उसके अंदर वैल्यूज होती है किस तरह से वो
कन्वर्जन होता है तो ये सारा डिटेल्स
स्पेसिफिकेशन यहां पे है ऑलरेडी एक वीडियो
में मैंने काफी डिटेल में उसको डिस्कस कर
रखा है ये बात अलग है की वो इंग्लिश में
है तो अभी आपको डिटेल में जाने की जरूरत
नहीं है बस इतना ध्यान रखिए की जब भी जाओ
फ्रूट का कन्वर्जन हो तो स्पेसिफिकली इस
तरह की केस में तो आप प्लीज इन पे
डिपेंडेंट मत रहिए आपने बहुत सारे ऐसे भी
एग्जांपल देखे होंगे जो की लिखते हैं की
थ्री प्लस फोर मल्टीप्लाई बाय फाइव मॉडल्स
बाय थ्री स्काउट पुट के आएगा देखिए ये
सारे के सारे जो है इस तरह के वैल्यूज है
यह क्वेश्चंस के लिए ठीक है एग्जाम्स के
लिए ठीक है की आप इस तरह का आउटपुट दे रहे
हैं बट अगर रियल लाइफ सिचुएशन में आप ऐसा
कोड लिखते हैं तो आपको एक सिंगल आदमी भी
अप्रिशिएट नहीं करेगा क्यों लिखना है
कन्फ्यूजन को अगर आपको कुछ वैल्यूज पे ही
डिफाइन करना है तो आप और पेरेंटी से उसे
करिए ना की ताकि मुझे फर्स्ट इसका आउटपुट
चाहिए उसके बाद जो वैल्यू आता है उससे
इसको मल्टीप्लाई करना है तो पेरैंथेसिस का
आप उसे क्यों नहीं कर रहे हैं तो प्लीज ये
जो क्वेश्चन वाला माइंड सेट है की मुझे
सिर्फ क्वेश्चंस सॉल्व करना है एग्जाम में
आना ठीक है वो भी जरूरी है लेकिन वो
प्रैक्टिकल उसे नहीं होता है कहीं पे भी
इस तरह की वैल्यूज अगर आप लिख रहे हैं या
कोड लिख रहे हैं आपका कोड रिव्यू होगा ही
नहीं वहां पर मतलब आपकी जो पुल रिक्वेस्ट
है मर्ज ही नहीं होगी और बड़े कॉर्पोरेट
में मर्ज हो ना एक कॉमन चीज है आप गूगल
में कम कर रहे हैं कहीं भी कम करें इस तरह
का कोड आपके पास वापस भेज दिया जाएगा की
प्लीज अपना कोड ठीक करिए ये बिल्कुल सही
तरीका नहीं है दोबारा से कोड लिखिए या फिर
हो सकता है क्वेश्चन भी का रहा है की कहां
से सिख क्या है इस तरह का मेस्सी कोड
लिखना तो प्लीज प्लीज एक हम्बल रिक्वेस्ट
है इसका ध्यान रखना जिनका और आसान है यह
किस तरह से प्रक्रिया होता है वह यहां पर
देखिए या फिर इंग्लिश चैनल वाला वीडियो
देख लीजिए अभी के लिए सभी के लिए आपको
सिर्फ इतना ही जानना है की इस तरह का
जावास्क्रिप्ट के अंदर कन्वर्जन होता है
अगर स्ट्रिंग फर्स्ट है तो सभी को
स्ट्रिंग में ट्रीट किया जाएगा और अगर
स्ट्रिंग लास्ट में है तो पहले जो
कन्वर्जन है वो हो जाएगा इसका रीजन वहां
पे है तो ये तो वो हमारा बेसिक अब इसी तरह
से और भी कन्वर्जन होते हैं कुछ स्पेशल
टाइप के कन्वर्जन वो भी मैं आपको बताता
हूं
ट्रिकी कन्वर्जन जिनको बोलते हैं तो हमने
कंसल्ट लिखा अब obbvious सी बात है यहां
पे अगर आप ट्रू की वैल्यू आप प्रिंट करना
चाहेंगे तो क्या प्रिंट आएगा सबसे पहले
मैं इन सारे कंसों लॉक को हटा देता हूं की
इनका कम तो हो गया है अब देखते हैं की कौन
सा लॉक में जब मैं ट्रू प्रिंट करता हूं
तो क्या वैल्यू प्रिंट होती है obbvious
सी बात है ट्रू ही प्रिंट होगा लेकिन आप
देखेंगे की कुछ इस तरह की वैल्यूज भी होती
है जहां पे आप इसको प्लस तू लिख देते हैं
अब ये कोड लिखना सबसे खराब बात है क्योंकि
आप कन्फ्यूजन कोड लिखना चाहते हो कोर्ट
क्लीन होना चाहिए सिंपल होना चाहिए रीडेबल
होना चाहिए यहां पर कोई गेम थोड़ी ना चल
रहा है की पहेली पूछो कोर्ट सिंपल होना
चाहिए लेकिन जब इस तरह का कोड लिखते हैं
तो वैल्यू देखकर आपको सरप्राइज होगा की वो
वैन होगा क्योंकि ओबवियस सी बात है ट्रू
अपने आप में बोलियां है अभी उसका कन्वर्जन
होना है क्योंकि आपने उसमें इंक्रीमेंट
किया है तो इंक्रीमेंट तो हुआ नहीं बट
आपका वैल्यूज ए गया है इसी तरह से आप शायद
सोच रहे होंगे की इसका आउटपुट क्या आएगा
तो वो भी मैं आपको दिखा देता हूं की यहां
पे ऑलरेडी इसमें एरर दे दिया है की ये
एक्सपेक्टेड नहीं था अगर आप इसको रन भी
करेंगे तो आप कहेंगे की ये क्या कर रहे हो
बट प्लस ट्रू वहां पे पॉसिबल है इसी तरह
से आपको दिखेगा मैं यहां पे लिख के छोड़
देता हूं आपके लिए +2 इसी तरह से आपको
दिखेगा की कई बार कुछ लोग लिख देते हैं
प्लस और मत पर रख दीजिए अब हम ऑलरेडी देख
चुके हैं की एम्टी परंथेसिस को जब आप
बुलियन वैल्यूज में इनमें कन्वर्ट करते
हैं तो जीरो आता है प्लस लिखने से वो
कन्वर्जन हो जाता है हान ये भी एक टाइप का
ट्रिकी कन्वर्जन है बट नहीं करना चाहिए
नहीं करना चाहिए इससे किसी का कोई सेंस
नहीं है कोई वैल्यूज नहीं है ऑपरेटर
प्रेसीडेंसी पढ़ना चाहिए की किसका
प्रायोरिटी पहले आता है लेकिन वो सिर्फ
एग्जाम के लिए अगर प्रोडक्शन में आप जा
रहे हैं तो इस तरह का कम नहीं होता है
वहां यहां पर दूसरा कम होता है अच्छा एक
चीज और आपको मैं बताता हूं यहां पे कुछ
असाइनमेंट ऑपरेटर के रिगार्डिंग
इंटरेस्टिंग हालांकि मैं इसको प्रेफर नहीं
करता हूं की कोई भी इस तरह का कन्वर्जन
करें या कोई भी इस तरह का ऑपरेशन भी करें
लेकिन एक ऑपरेशन यहां पर आपको दिखेगा कई
बार कई जगह किया जाता है जैसे आपने लिया
वैल्यू तो आपने लिखा नाम अन वैन और लिखा
नाम 2 और लिखा नाम थ्री अब कई बार क्या
होता है ज्यादातर नहीं लिखेंगे आप इस तरह
का तो आप लिख देते हैं नंबर इसका वैल्यू
भी इक्वल तू है नाम तू और इसका वैल्यू है
नाम थ्री के इक्वल और जिनका साइन मैन कुछ
हम करेंगे तू प्लस तू से हालांकि इस तरह
के भी कोड को मैं कुछ खास वैल्यू नहीं
देता हूं क्योंकि पहली बात तो यहां पे
कंसिस्टेंसी नहीं है अगर कंसिस्टेंसी है
तो क्यों लिखना इतना कन्फ्यूजन कोड अगर
आपको सारे वैल्यूज में साइन ए की वैल्यू
करनी थी अब पता है मुझे की नंबर वैन के
अंदर भी फोर है एन तू के अंदर भी फोर है
थ्री के अंदर भी फोर है
और भी अच्छे तरीके बैटरीज में वेरिएबल
डिफाइन करने के स्मार्ट लगता है की देखो
मैं कितना इंटेलिजेंट हूं बट कोडिंग के
अंदर रीडेबिलिटी सबसे जरूरी चीज है और उसी
पे सबसे ज्यादा फोकस करना चाहिए इस तरह के
ट्रिकी बिहेवियर ज्यादातर बड़ी कंपनियों
में नहीं चलते हैं वहां पे क्योंकि आपके
बाद भी 10 लोग आएंगे जिनको कोड पढ़ना है
वहां पे ज्यादा बटोर रहेगा अच्छा इसके
अलावा एक छोटा सा ऑपरेशन और होता है जो
आपको कई बार दिखाई देगा जैसे की फॉर
एग्जांपल गेम काउंटर वैसी बात है गेम
काउंटर को तो इंक्रीज ही होना है तो
सपोर्ट करिए आप ने स्टार्ट किया था 100
पॉइंट्स के साथ तो उसके बाद अब क्या है की
आपने गेम काउंटर लिया और उसको प्लस प्लस
कर दिया तो अब गेम काउंटर की वैल्यू क्या
होगी तो यहां पे जो आप देखेंगे कई बार
ट्रिकी क्वेश्चंस भी होते हैं सबसे पहले
हम गेम काउंटर की वैल्यू यहां पे प्रिंट
करते हैं
है ताकि एटलिस्ट हमें पता रहे और इन दोनों
लाइंस कम कमेंट कर देते हैं
इन्वेस्टिगेशन स्टडी चल रही है इसीलिए तो
गेम काउंटर की वैल्यू हम यहां पर देखते
हैं तो
गेम काउंटर टाइपिंग मिस्टेक होती रहती है
ठीक है
अच्छा कई बार आपको क्या दिखेगा की इस तरह
से नहीं इसकी वैल्यूज
कुछ इस तरह
की वैल्यू वापस से वैन वैन आई तो यहां पर
कुछ बार कुछ टाइम पर क्या होगा की आप से
पूछा जाएगा प्रेसिडेंट ऑपरेटर प्रीफिक्स
अगर करते हैं तो क्या होता है पोस्ट फिक्स
करते तो क्या करते हैं इस एग्जांपल के
अंदर तो हमें कोई भी चीज नहीं दिखाया बट
एक्चुअली
कहां से चाहिए की वैल्यू
इंक्रीमेंट हो जाती है
लेकिन यह
मन यहां पर आपको देखना है तो यहां पर
इंक्रीमेंट जो है ऑपरेटर्स के बारे में
पूरा अच्छे से डिटेल डिस्क्रिप्शन है की
प्रीफिक्स हो तो क्या हो पोस्टफिक्स हो तो
क्या हो अब आपको क्या करना है कुछ नहीं
होगी यहां पे आपको क्या करना है ये जो
इंक्रीमेंट ऑपरेटर है यहां पर दोनों के
एग्जांपल दे रखे हैं प्लस प्लस ए और एक्स
+ सिंपली जाइए इनको थोड़ा स्टडी करने की
कोशिश करिए ज्यादा बड़ा सिंटेक्स नहीं आप
आसानी से इसको समझ सकते हैं थोड़ा सा आप
सिंटेक्स यहां पर इसको जाइए थोड़ा सा रीड
करिए क्योंकि देखिए कब तक ही आप मुझसे यह
ट्यूटोरियल से सीखते रहेंगे कभी ना कभी तो
डॉक्यूमेंटेशन में जाना है छोटा सा टॉपिक
है नहीं समझ में आएगा तो मैं हूं वीडियो
बना दूंगा लेकिन थोड़ा सा कोशिश करिए
प्रीफिक्स पोस्टफिक्स में जाइए छोटा सा
साइनमेंट है जाके उसको सॉल्व करिए अच्छा
इतना ही है इसके अलावा आप कुछ पढ़ना चाहें
तो मैं आपको इसका लिंक भी दे देता हूं
ताकि आप ये जो कन्वर्जन वाला टॉपिक है ये
आप यहां से पढ़ पाएं ठीक है लिंक तू स्टडी
तो यह आपके पास लिंक है मैं इसको यहां पर
कमेंट कर देता हूं तो अब आपके पास छोटा सा
कम है की इसको थोड़ा सा पड़ी है कोशिश
करिए समझ में आता है नहीं आता नहीं आता
कोई बात नहीं और सबसे इंपॉर्टेंट एमडीएम
पर जाकर प्रीफिक्सर पोस्ट के बारे में
पढ़िए अब इतना ही है हमारे पास कन्वर्जन
और ऑपरेशंस के बारे में इससे ज्यादा डिटेल
आपको जानने की जरूरत नहीं है जो भी आपको
जानना होगा जैसे-जैसे हम प्रोजेक्ट
बनाएंगे वहां पे आपके और कॉन्सेप्ट क्लियर
हो जाएंगे ठीक है तो शेयर करिए वीडियो को
सब्सक्राइब करना ना भूलिए मिलते हैं अगले
वीडियो में
Посмотреть больше похожих видео
#8 Type Conversion & Coercion in JavaScript
Lec-6: Typecasting in Python 🐍 with Execution | Python Programming 💻
02 - Expressions B - Python for Everybody Course
C_75 Pointers in C-part 5 | Pointer Arithmetic (Addition) with program
Meet Notion's Formula Property: Part 1
The byte, short, and long Data Types in Java
5.0 / 5 (0 votes)