Question 13
Consider this Vue 2 (CDN) method inside a component.
methods: { async submit() { const response = await fetch('/api/users', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username: 'Asha' }) });
const data = response.json(); localStorage.setItem('userId', data.id); }}If the ID of the user “Asha” in the database is 7, What will be stored in localStorage under the key "userId" after submit() runs?
"7" (string)
7 (number)
"undefined" (string)
"[object Promise]" (string)