HTML Placeholder Attribute
Placeholder Attribute.
Use the below reference image link:.
https://assets.ccbp.in/frontend/content/dynamic-webapps/ce-3-2-1-html-placeholder-attribute-op.png
using CSS Border Properties
Properties.
Use the below reference image link:
https://res.cloudinary.com/dfxicv9iv/image/upload/v1619085330/css-border-properties-output_a4ucou.png
Achieve the design by using CSS border
border-* properties. The * indicates the direction.Apply the border shorthand property with the width
CSS Colors used:
#184b73
#ffffff
by using for...of loop.
Use the below reference image link:
https://assets.ccbp.in/frontend/content/dynamic-webapps/ce-3-1-3-for-of-loop-op.png.
Achieve the design using the
for...of loop to iterate over an array in the JS prefilled code.
USE;Dynamic Event Listeners
Achieve the given functionality.
CSS Colors used:
Text colors Hex code values used:
#0000ff
USE;
Creating and Appending Elements Dynamically with JS.
Use the below reference image.
Achieve the given design using JS.
CSS Colors used:
Text colors Hex code values used:
#0000ff
Achieve the given functionality using JS.
product of array items
given an array integers, write a JS program to get the product of the given integers in the array
sample input1
[1,2,3]
sample output1
1*2*3 = 6
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let integers = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
}
Squares of array items
given an array myArray write a JS program to get the squares of each item in the given array
input1
[[1,2],[3,4][5,6]]
output1
[ [1,4],[9,6], [25, 36]]
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let myArray = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
}
find the first value
given an array myArray of positive integers, write a JS program to find the first smallest integer divisible 2 and 3 Log the number or Undefined.in case no integer is found divisible by 2 and 3
input1
[51,18,15,12]
output1
[12]
input2
[41,29,17,19,31]
output2
undefined
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let myArray = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
}