I'm having trouble following the instructions of this problem at codecademy.com. After getting the value stored at 'x' using the data() function, I'm supposed to double it, without using 'var' and then store it at 'y' (using the data() function). I've tried different combinations of 'datafulDiv * 2' to double it, but they've all been wrong. I'm sure this is a simple problem that I'm being very thick about, but if you can help I would be very grateful
$('document').ready(function() {
//get the div.
//do not add var before this object for testing purposes!!
$datafulDiv = $('#dataful');
//get the value stored at 'x'
$datafulDiv.data('x');
//double it and store it at 'y'. again do not use var!
});
$datafulDiv.data('x')to calculate two times it's current value?var x = ...; x = x + x, everywhere you havexjust write$datafulDiv.data('x'). It's the same thing in the end.