A shared folder with AI prompts and code snippets
From workspace: Replit
Team: AI Prompts
Total snippets: 6
6 snippets
Describe what this TypeScript interface means and how it's used.
Explain this interface and how it might be used. Code: interface User { id: number; name: string; email?: string; } Include: – Optional fields – Common usage in function arguments
Explain how this list comprehension works and what it returns.
Explain what this list comprehension does. Code: nums = [1, 2, 3, 4, 5] squares = [x*x for x in nums if x % 2 == 0] Include: – How filtering works – Final result list
Break down what this regex pattern matches and how.
Explain what this regex pattern does. Pattern: ^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$ Include: – Each group – Anchors – Common use case
Explain how this SQL query joins and filters the data.
Explain this SQL query step by step. Include: – What the JOIN is doing – How WHERE affects the result – Final output rows Query: SELECT u.name, o.total FROM users u JOIN orders o ON u.id = o.user_id WHERE o.total > 100;
Break down how an async JavaScript function executes.
Explain how this async function runs. Include: – What promises are doing – What is awaited and when – Final output order Code: async function fetchData() { const user = await getUser(); const posts = await getPosts(user.id); return {...
Explain a recursive Python function line by line in plain English.
Explain this recursive function line by line. Goal: – Help beginners understand how recursion works – Include base and recursive case flow Code: def factorial(n): if n == 0: return 1 return n * factorial(n - 1)