{}const=>[]async()letfn</>var
PythonJSBasics

What to expect at Python/JavaScript interviews: a guide for juniors

A checklist and analysis of popular topics for Juna — from basic syntax to tricky tasks.

К

Kodik

Author

2 min read

An interview is not an exam where you have to pass 100%. It's a dialogue.
But in order not to get stuck, it is important to understand what exactly is asked of beginner Python and JavaScript developers — and how to prepare for it 🧠

🐍 Python questions in interviews

1. ✅ Basic syntax

  • What is a variable?

  • How does = differ from ==?

  • What does if, elif, else do?

  • How does for and while work?

💡 The employer wants to understand whether you can formulate simple logic

2. 🔄 Data types

  • What is the difference between list, tuple, set, dict?

  • What will be displayed: a = [1, 2]; b = a; b.append(3); print(a)?

  • What is None?

3. 🧩 Functions

  • How to write and call a function?

  • What are default arguments?

  • What are *args and **kwargs?

  • What will the function return without return?

4. 🧪 Logic tasks

def reverse_words(text):
    # Example: "hello world" → "world hello"

📜 Frequently asked questions:

Subject

Example

Lists and slices

a[1:-1]

Generators

[x for x in range(5)]

Exceptions

try / except

Imports

import math

Working with strings

" ".join(), .split()

💡 Example of a typical question

def func(val, lst=[]):
    lst.append(val)
    return lst

print(func(1))  # ?
print(func(2))  # ?

Catch: the value of lst is saved between calls if you do not pass your list.

🔥 100,000+ students already with us

Tired of reading theory?
Time to code!

Kodik — an app where you learn to code through practice. AI mentor, interactive lessons, real projects.

🤖 AI 24/7
🎓 Certificates
💰 Free
🚀 Start learning
Joined today

🌐 JavaScript questions in interviews

1. 🧠 Language basics

  • What are the variables var, let, const?

  • What is scope?

  • How does == differ from ===?

2. 🔄 Types and conversions

  • What is undefined, null, NaN?

  • Type typeof and its features

  • Explicit and implicit type conversion

3. 🧩 Callbacks, async/await, and promises

  • How does setTimeout work?

  • What is Promise and how do I use it?

  • Async function that waits 1 second:

async function wait() {
  await new Promise(resolve => setTimeout(resolve, 1000));
  console.log("1 sec passed");
}

4. 🧪 Questions with code

for (var i = 0; i < 3; i++) {
  setTimeout(() => console.log(i), 100);
}
// → 3, 3, 3

Catch: the variable var does not create a new scope

5. 💥 Important topics

Subject

Comment

Hoisting

Raising variables

Event Loop

Asynchrony

DOM

Working with HTML

Closures

Very popular!

Switch functions

() => {} and their this

🤝 Thinking questions

  • How would you write an array filtering function?

  • What would a simple server look like?

  • How to optimize the code?

❗ This is a logic check, not an API check.

How to prepare?

  1. Go through the basics on learnpython.org or javascript.info

  2. Solve problems on Codewars, Leetcode (8kyu / Easy)

  3. Write code by hand. A lot.

  4. Make a mini-project (bot, website, script)

  5. Ask a friend or AI to ask you questions

  6. Learn and train with Kodik

  7. Read useful posts in our Telegram community - you're not alone there.

💬 Write if you want a selection of 10 popular tasks from job interviews - with analysis and code!

🎯Stop procrastinating

Liked the article?
Time to practice!

In Kodik, you don't just read — you write code immediately. Theory + practice = real skills.

Instant practice
🧠AI explains code
🏆Certificate

No registration • No card