Offers advice, suggestion or a clue.
It displays as follows:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut porta, neque id feugiat consectetur, enim ipsum tincidunt nunc, id suscipit mauris urna sit amet lectus.
To use it in Moodle, click on the Components for Learning button In the Atto editor and select the item Tip:
Potassium is a silvery-white metal that is soft enough to be cut with a knife with little force. It reacts rapidly with atmospheric oxygen to form flaky white potassium peroxide in only seconds of exposure.
The name ‘Potassium’ derives from pot ash, referring to the ancient procedure of manufacturing the element by soaking wood ashes in a pot.
Potassium in nature occurs only in ionic salts. Elemental potassium reacts vigorously with water, generating sufficient heat to ignite hydrogen emitted in the reaction, and burning with a lilac-colored flame.
Potassium and Potash articles from Wikipedia – licensed under the Creative Commons Attribution-ShareAlike License 3.0
The pop()
is a JavaScript pre-built method that removes the last element from an array and returns that element. This method changes the length of the array.
There is no point in memorizing all the pre-build functions in a programming language, as there may be hundreds or even thousands of them and they get easily deprecated. Is way more advisable lo invest time in exploring the documentation and learning to use it faster while coding.
The following code creates the myFish
array containing four elements, then removes its last element.
const myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
const popped = myFish.pop();
console.log(myFish); // ['angel', 'clown', 'mandarin' ]
console.log(popped); // 'sturgeon'
Array.prototype.pop() article at MDN web docs – licensed under Creative Commons.