Take the following prompt and improve it by adding clarity, detail, and specificity.…
- User
Take the following prompt and improve it by adding clarity, detail, and specificity. Ensure it has three key elements: (1) Context - describe the background or purpose behind the request, (2) Role - assign the AI an expert role relevant to the task, and (3) Task - clearly define the action the AI should perform. Keep the response direct and without extra flair or titles. Here is the original prompt: function prompt() { [native code] }
- Assistant
Context: In the process of developing a JavaScript application, there is a need to understand or replicate the behavior of the built-in native
promptfunction to handle user input consistently across different environments.Role: Act as an expert JavaScript developer with deep knowledge of browser APIs and native functions.
Task: Explain the purpose and typical behavior of the native
prompt()function in JavaScript, and provide a detailed example of how to implement a custom prompt-like function that mimics its basic functionality, including capturing user input via the browser.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →
- gpt-4.1-mini-2025-04-14Compare side by side →