Bird
0
0

Given this Remix asset URL configuration snippet, what will be the full URL served to users if CDN_URL is set to https://cdn.example.com?

medium📝 Predict Output Q13 of 15
Remix - Performance
Given this Remix asset URL configuration snippet, what will be the full URL served to users if CDN_URL is set to https://cdn.example.com?
const assetUrl = `${CDN_URL}/build/_assets/logo.png`;
A/build/_assets/logo.png
Bhttps://example.com/build/_assets/logo.png
Chttps://cdn.example.com/build/_assets/logo.png
Dcdn.example.com/build/_assets/logo.png
Step-by-Step Solution
Solution:
  1. Step 1: Understand template literal usage

    The code uses a template string combining CDN_URL and the asset path.
  2. Step 2: Substitute CDN_URL value

    Replacing CDN_URL with 'https://cdn.example.com' results in 'https://cdn.example.com/build/_assets/logo.png'.
  3. Final Answer:

    https://cdn.example.com/build/_assets/logo.png -> Option C
  4. Quick Check:

    Template string + CDN_URL = full CDN asset URL [OK]
Quick Trick: Replace variable with value inside template string [OK]
Common Mistakes:
MISTAKES
  • Ignoring protocol https:// in URL
  • Using relative path instead of full CDN URL
  • Omitting the slash between CDN_URL and path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes