string var code example
Example 1: how to use string variable in javascript
<html>
<head>
<title>JavaScript Strings</title>
</head>
<body>
<script>
var re = "java";
var str = "Learn java";
if ( str.search(re) == -1 ){
document.write("Not found!" );
} else {
document.write("Found!" );
}
</script>
</body>
</html>
Example 2: stringvar
#declare variable -->
var = StringVar()
#sets variable to what ever(most the time a string)
var.set("hello")
#this is used in tkinter!