# Replace all 0 in an Array with random numbers

Okey, folks so here it is, a solution to replace all the 0os in an array with a number. In the beginning I succeeded replace all 0 with the same number. But then i wanted to replace them with different values, all based on a random number. Here is the solution, written in Javascript:

```<html>

<body>
```
```<script>

var myData = [];
myData.push(5, 10, 0, 0, 0, 30, 0, 0, 0, 0);

//kanske används vid ett senare tilfälle
var random = Math.floor((Math.random() * 100) + 1);
var random1 = Math.floor((Math.random() * 100) + 1);
var random2 = Math.floor((Math.random() * 100) + 1);
//

console.log(myData);

for(var i = 0; i < myData.length; i++){
for(nollor in myData){

if(myData[i] === 0){
myData[i] = random;
random = Math.floor((Math.random() * 100) + 1);
myData[i] = random;

}

}

console.log(myData[i]);
}

</script>
```
```</body>
</html>
```

# How To Get Started With Programming/Coding

The main question many have is “how to get started with coding”.

1. Front End
Try to learn something easier, like Front End. Front End is the design, the visual of a site. HTML and CSS should do the trick. If you want more, there is JavaScript. And JavaScript reminds of such programming languages as C# or Java. Learn yourself how to use bootstrap(a library of CSS and JS) and furthermore jQuery. THose are the basics of Front End.

2. Back End
Here are things getting trickier. You should put your fokus on ASP.NET or PHP. Back End is where developing starts. As a webdeveloper, you need to know even databases. SQL is the database “language” that is mainstream.

3. Developing
After that you have wandered on point 1 and 2, by learning the languages, I would recomand you C#. Do first use the command programms to learn yourself what you code does. Many companies use C# or the .NET framwork, of whom C# is part of.

Otherwise, go JAVA, as many applications are written in Java. Python is also a choice if you find it easy, your direction should be dictated by what you wanna work with and even more important, what your skill level is. Or what it could be.

Enjoy!