This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final validAlphanumericCharacters = RegExp(r'^[a-zA-Z0-9]+$'); | |
var arr = [ | |
"230200666PO10001", | |
"230200666PO10002", | |
"230200666PO10003", | |
"230200666PO10004", | |
"230200742PO10001", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findPower(number, power) { | |
let powerOfNumber = Math.pow(number, power); | |
return powerOfNumber; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cube(number) { | |
let cubeOfNumber = Math.pow(number, 3); | |
return cubeOfNumber; | |
} | |
function square(number) { | |
let squareOfNumber = number * number; | |
return squareOfNumber; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cube(number) { | |
let cubeOfNumber = Math.pow(number, 3); | |
return cubeOfNumber; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function square(number) { | |
let squareOfNumber = number * number; | |
return squareOfNumber; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){ | |
console.log("I like turtles!"); | |
}, 5000); | |
console.log("Hey, I am Sam"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printAge(studentId) { | |
// Get the <li> which is clicked | |
let studentListItem = document.querySelector(`[data-id="${studentId}"]`); | |
// Get the age from the data attribute 'age' | |
let age = studentListItem.dataset.age; | |
// Finally log it to console, Duh ! | |
console.log('Age of the clicked student is ', age); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Data Attributes</title> | |
</head> |