First, an exercise. Can we represent all of css with plain data? Let's try.
let redText = { color: 'red' };
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
You have an array. Its sort order doesn't matter. You want to remove an item from this array.
The obvious thing to do would be to use splice
:
function remove(array, item) {
const index = array.indexOf(item);
array.splice(index, 1);
}
JavaScript warnings are these messages being displayed in yellow or red in your JavaScript console or terminal. They make no sense at all in general but they are a good indication of the health of your app. The points below will give you a general idea of how many warnings you should expect in your app:
0 warnings: the app is not working at all
5 warnings: app is probably starting but crashing soon after - try to find why it crashes. You'd think you could read the warnings to learn why it doesn't work, but that's not what warnings are for.
50 warnings: That's the soft spot - most likely everything's running smoothly