Help me, im stuck in this exam. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help me, im stuck in this exam.

Drag and drop from the options below to clear all values stored in the localStorage. Then store "a" using the key "b". localStorage.......... (); localStorage. setItem(....... , ....... );

9th Nov 2018, 10:35 PM
Vhendy Vendira
Vhendy Vendira - avatar
5 Answers
+ 5
According to the 3rd slide: https://www.sololearn.com/learn/HTML/2197/?ref=app You clear the values using the .clear() method provided by localStorage. .setItem()'s usage is: localStorage.setItem(key, value); So the answer should be pretty obvious.
10th Nov 2018, 1:21 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Had problems with that question as well at first..but it is pretty easy.. You have to read it really carefully. CLEAR all values in the localStorage ===> localStorage:"clear"() Store "a" using key "b" = key="b" // value="a" ====> localStorage:setItem("b","a");
21st Jan 2019, 3:46 PM
Eva Lange
Eva Lange - avatar
+ 1
clear b, a
8th Aug 2020, 4:01 PM
Biniyam Demisse
Biniyam Demisse - avatar
0
clear b, a
12th Aug 2020, 7:30 PM
Kamal Boulakhsoum
Kamal Boulakhsoum - avatar
0
clear b,a
16th Aug 2020, 12:43 PM
Japhet Simbeya
Japhet Simbeya - avatar