0% found this document useful (0 votes)
13 views1 page

JavaScript vs Python Flashcard Guide

The document provides a comparison of JavaScript and Python syntax for various programming functions, including printing output, taking user input, type checking, and data type conversions. It also highlights similarities and differences in control structures like loops and conditionals, as well as data structures such as arrays and objects. Additionally, it includes Hindi translations for the terms used in the comparisons.

Uploaded by

Rohan Sonawane
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

JavaScript vs Python Flashcard Guide

The document provides a comparison of JavaScript and Python syntax for various programming functions, including printing output, taking user input, type checking, and data type conversions. It also highlights similarities and differences in control structures like loops and conditionals, as well as data structures such as arrays and objects. Additionally, it includes Hindi translations for the terms used in the comparisons.

Uploaded by

Rohan Sonawane
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JavaScript Memory Flashcard (Python Comparison)

Function JavaScript Python Kaam (Hindi)

Print [Link]() print() Output dikhana

Input prompt() input() User se input lena

Type check typeof x type(x) Type check karna

String to Number Number('123') int('123') String ko number banana

Number to String String(123) str(123) Number ko string banana

Int from float parseInt('12.3') int(12.3) Float ko int banana

Constant const pi = 3.14 PI = 3.14 Constant variable

Variable let x = 5 x=5 Normal variable

For loop for (let i=0; i<5; i++) for i in range(5) Loop chalana

If-else if (x > 0) { ... } if x > 0: ... Condition check karna

Array/List ["a", "b"] ["a", "b"] List ya array

Push/Append [Link]('x') [Link]('x') Naya item daalna

Object/Dict {"name":"Ali"} {"name":"Ali"} Key-value data

Access Object [Link] dict["name"] Value access karna

Alert alert('Hi') Message popup

Confirm confirm('Sure?') Yes/No box

JSON Stringify [Link](obj) Object string

JSON Parse [Link](json) String object

You might also like