slides.com/jkohlin/jsx1/live
assuming you have:
var name = "Jolly Rocker"
var name = "Alexander" var part = name.slice(4,7) // and
Alexander
012345678
var name = "Alexander" var part = name.slice(3) // xander
if the end-parameter is missing, it slices to the end of the string
https://scrimba.com/c/cKpNpVSP
between any two numbers
var min = -15; // ANY number you want var max = 10; // a higher number than min. var random = Math.floor(Math.random() * (max-min+1)+min);
var random = Math.round( Math.random() );
https://scrimba.com/c/c9BzkwUR
the character at position...
var vowels = "aeiouy" // 012345 var letterU = vowels.charAt(4)
https://scrimba.com/c/c3PzLDt2
By Johan Kohlin
Conditionals and Loops exercise
Lecturer at School of engineering, Jönköping University.